Skip to content

Azure database exporter fails for Azure PostgreSQL Flexible Server due to unsupported storage_limit metric #5345

@tr42wo

Description

@tr42wo

Description

azure_database_exporter fails to collect Azure infrastructure metrics for Azure PostgreSQL Flexible Server because the request includes an unsupported metric: storage_limit.

As a result, CPU, memory, and storage metrics are missing in PMM.

We verified that the following metrics are available for Azure PostgreSQL Flexible Server:

  • cpu_percent
  • memory_percent
  • storage_percent
  • storage_used

However, storage_limit is not exposed by Azure Monitor Metrics API for Flexible Server.

Azure returns HTTP 400 if even one invalid metric name is included in the request, causing the entire metrics query to fail.

This suggests that azure_database_exporter currently uses a static metric list that includes metrics unsupported by Microsoft.DBforPostgreSQL/flexibleServers.

Expected Results

PMM should collect Azure infrastructure metrics successfully for Azure PostgreSQL Flexible Server instances.

Unsupported metrics should either:

  • be ignored,
  • dynamically detected,
  • or excluded for Flexible Server resources.

Actual Results

PostgreSQL metrics are collected correctly (postgres_exporter, pg_stat_statements, etc.), but Azure infrastructure metrics such as CPU and memory are missing.

PMM logs contain repeated errors similar to:

time="2026-05-11T12:37:35Z"` level=error msg="Received 400 status for resource /subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.DBforPostgreSQL/flexibleServers/<server-name>/providers/microsoft.insights/metrics?aggregation=Average&api-version=2018-01-01&metricnames=cpu_percent,memory_percent,storage_percent,storage_used,storage_limit,network_bytes_egress,network_bytes_ingress&timespan=<timestamp>"

Version

PMM 3.7.1

Steps to reproduce

  1. Enable Azure integration in PMM
  2. Add Azure PostgreSQL Flexible Server instances
  3. Wait for Azure metrics collection

Relevant logs

Code of Conduct

  • I agree to follow Percona Community Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug report

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions