Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prometheus.exporter.azure returns only 10 resources #2735

Open
arnitolog opened this issue Feb 15, 2025 · 1 comment
Open

prometheus.exporter.azure returns only 10 resources #2735

arnitolog opened this issue Feb 15, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@arnitolog
Copy link

What's wrong?

prometheus.exporter.azure returns a maximum of 10 resources when it uses Azure Metrics Batch API. It looks like it uses a default value for top parameter, which 10: https://learn.microsoft.com/en-us/rest/api/monitor/metrics-batch/batch?view=rest-monitor-2023-10-01&tabs=HTTP

here are several examples of different resources:

Image

Image

here is an example of how many disks I have:

Image

and postgres servers:

Image

I think it will be good to have this parameter configurable on the exporter side

Steps to reproduce

configure prometheus.exporter.azure for any resource type with more than 10 resources. Observe the number of metrics returned

System information

No response

Software version

Alloy v1.6.1

Configuration

prometheus.exporter.azure "disks_metrics" {
  subscriptions    = [
      "11111111111111111",
  ]
  resource_type    = "microsoft.compute/disks"
  regions          = [
      "eastus",
	]
	metrics          = [
    "Composite Disk Read Bytes/sec",
    "Composite Disk Read Operations/sec",
    "Composite Disk Write Bytes/sec",
    "Composite Disk Write Operations/sec",
    "DiskPaidBurstIOPS",
	]
	metric_aggregations = [
        "average",
	]
  timespan                    = "PT5M"
}

prometheus.exporter.azure "postgres_metrics" {
  subscriptions    = [
      "11111111111111111",
  ]
  resource_type    = "microsoft.dbforPostgreSQL/flexibleServers"
  regions          = [
      "eastus",
	]
	metrics          = [
    "cpu_percent",
    "cpu_credits_remaining",
    "cpu_credits_consumed",
    "read_iops",
    "write_iops",
    "disk_queue_depth",
    "memory_percent",
    "storage_free",
    "storage_percent",
    "txlogs_storage_used",
    "backup_storage_used",
    "active_connections",
    "max_connections",
    "physical_replication_delay_in_seconds",
    "physical_replication_delay_in_bytes",
    "logical_replication_delay_in_bytes",
    "disk_iops_consumed_percentage",
    "disk_bandwidth_consumed_percentage",
    "client_connections_active",
    "client_connections_waiting",
    "server_connections_active",
    "server_connections_idle",
    "total_pooled_connections",
    "num_pools",
    "is_db_alive",
	]
	metric_aggregations = [
        "average",
        "maximum",
	]
  timespan                    = "PT5M"
}

Logs


@arnitolog arnitolog added the bug Something isn't working label Feb 15, 2025
@ptodev
Copy link
Collaborator

ptodev commented Feb 20, 2025

Sounds like we need to port the metricTop argument from upstream? I'm not sure how easy it is, but if someone wants to open a PR for it then I think it'd be acceptable to add this in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants