Azure Monitor managed service for Prometheus
Azure Monitor managed service for Prometheus is a part of Azure Monitor Metrics. It allows collecting Prometheus metrics and analyzing them with Azure Monitor tools.
Integration with Nobl9 lets you collect metrics from Azure Monitor managed service for Prometheus and create SLOs based on them.
Azure Monitor managed service for Prometheus parameters and supported features in Nobl9
- General support:
- Release channel: Beta
- Connection method: Agent, Direct
- Replay and SLI Analyzer: Supported
- Event logs: Supported
- Query checker: Not supported
- Query parameters retrieval: Supported
- Timestamp cache persistence: Supported
- Query parameters:
- Query interval: 1 min
- Query delay: 0
- Jitter: 15 sec
- Timeout: 30 sec
- Agent details and minimum required versions for supported features:
- Environment variable:
PROM_QUERY_DELAY
- Plugin name:
n9prometheus
- Replay and SLI Analyzer:
0.78.0-beta
- Maximum historical data retrieval period:
30 days
- Query parameters retrieval:
0.78.0-beta
- Timestamp cache persistence:
0.78.0-beta
- Additional notes:
- Support for Prometheus metrics
- Learn more
Authenticationβ
To query an Azure Monitor workplace, authenticate with your Microsoft Entra ID with client_id
and client_secret
.
For this:
- Register an Azure application with Microsoft Entra ID.
- Assign your application the Monitoring Data Reader role to your required Azure Monitor workspace.
This role meets the Nobl9 requirements for metric collection.
You can also use sloctl
.
This way, you can configure SLOs for your Azure Cloud application without the resource and metric autocompletion.
We recommend granting the Monitoring Data Reader role on the subscription or resource group level rather than a specific resource. A broader scope provides a more comprehensive choice of subscriptions, resource groups, resources, and metrics in the Nobl9 platform.
URLβ
The Azure Monitor managed service for Prometheus agent requests the Range queries API endpoint in the /api/v1/query_range
form. For example:
GET /api/v1/query_range
POST /api/v1/query_range
Omit the /api/v1/query_range
API path from the URL. Specify only the base URL for
your Prometheus server.
For example, if your Prometheus server is available under <http://prometheus.example.com>
and
you access API via <http://prometheus.example.com/api/v1>
, then use only the <http://prometheus.example.com>
part.
Other APIs or Web UIs have similar path endings. Omit them in the URL: for example, the /graph
part of the path.
This integration focuses on querying the Prometheus servers, not fetching metrics directly from services.
Avoid using URLs pointing to service endpoints
that expose data in the Prometheus format
(often under the /metrics
path).
Learn about how to find a query endpoint.
Adding Azure Monitor managed service for Prometheus as a data sourceβ
You can connect the Azure Monitor managed service for Prometheus data source using the direct or agent connection methods.
Direct connection methodβ
Nobl9 Webβ
- Navigate to Integrations > Sources.
- Click .
- Click the required Source button.
- Choose Direct.
-
Enter the URL of your required base Prometheus server.
-
Enter your Azure Tenant ID.
It is an8-4-4-4-12
-character code containing digits0-9
and lettersAa-Ff
. -
Enter your Microsoft Entra Client ID and Client Secret.
- Select a Project.
Specifying a project is helpful when multiple users are spread across multiple teams or projects. When the Project field is left blank, Nobl9 uses thedefault
project. - Enter a Display Name.
You can enter a user-friendly name with spaces in this field. - Enter a Name.
The name is mandatory and can only contain lowercase, alphanumeric characters, and dashes (for example,my-project-1
). Nobl9 duplicates the display name here, transforming it into the supported format, but you can edit the result. - Enter a Description.
Here you can add details such as who is responsible for the integration (team/owner) and the purpose of creating it. - Specify the Query delay to set a customized delay for queries when pulling the data from the data source.
- The default value in Azure Monitor managed service for Prometheus integration for Query delay is
0 minutes
.
infoChanging the Query delay may affect your SLI data. For more details, check the Query delay documentation. - The default value in Azure Monitor managed service for Prometheus integration for Query delay is
- Enter a Maximum Period for Historical Data Retrieval.
- This value defines how far back in the past your data will be retrieved when replaying your SLO based on this data source.
- The maximum period value depends on the data source.
Find the maximum value for your data source. - A greater period can extend the loading time when creating an SLO.
- The value must be a positive integer.
- Enter a Default Period for Historical Data Retrieval.
- It is used by SLOs connected to this data source.
- The value must be a positive integer or
0
. - By default, this value is set to 0. When you set it to
>0
, you will create SLOs with Replay.
- Click Add Data Source
sloctlβ
-
Create a YAML resource definition for your Azure Monitor managed service for Prometheus using the provided template.
-
Run
sloctl apply
to proceed.
- apiVersion: n9/v1alpha
kind: Direct
metadata:
# Optional
displayName: Azure Prometheus data source (direct connection)
name: azure-prometheus-data-source
project: my-project
spec:
azurePrometheus:
# Replace the clientId and clientSecret placeholders with your Microsoft Entra ID credentials
clientId: "<YOUR_CLIENT_ID>" # secret
clientSecret: "<YOUR_CLIENT_SECRET>" # secret
tenantId: <YOUR_AZURE_TENANT_ID>
url: "<YOUR_PROMETHEUS_SERVER_URL>"
# Replay configuration
historicalDataRetrieval:
maxDuration:
# Numeric, up to 30 days for Azure monitor managed service for Prometheus
value: 30
unit: Day
defaultDuration:
value: 15
unit: Day
# The default query delay value for Azure Monitor managed service for Prometheus is 0 seconds
queryDelay:
value: 0
unit: Second
Field | Type | Description |
---|---|---|
queryDelay.unit mandatory | enum | Specifies the unit for the query delay. Possible values: Second | Minute . β’ Check query delay documentation for default unit of query delay for each source. |
queryDelay.value mandatory | numeric | Specifies the value for the query delay. β’ Must be a number less than 1440 minutes (24 hours). β’ Check query delay documentation for default unit of query delay for each source. |
releaseChannel mandatory | enum | Specifies the release channel. Accepted values: beta | stable . |
Source-specific fields | ||
azurePrometheus.clientId mandatory | string, secret | Your Microsoft Entra ID client ID. |
azurePrometheus.clientSecret mandatory | string, secret | Your Microsoft Entra ID client secret. |
azurePrometheus.tenantID mandatory | string | The identifier of your Microsoft Entra tenant. |
azurePrometheus.url mandatory | string | Base URL to Prometheus server. See authentication section above for more details. |
Replay-related fields | ||
historicalDataRetrieval optional | n/a | Optional structure related to configuration related to Replay. β Use only with supported sources. β’ If omitted, Nobl9 uses the default values of value: 0 and unit: Day for maxDuration and defaultDuration . |
maxDuration.value optional | numeric | Specifies the maximum duration for historical data retrieval. Must be integer β₯ 0 . See Replay documentation for values of max duration per data source. |
maxDuration.unit optional | enum | Specifies the unit for the maximum duration of historical data retrieval. Accepted values: Minute | Hour | Day . |
defaultDuration.value optional | numeric | Specifies the default duration for historical data retrieval. Must be integer β₯ 0 and β€ maxDuration . |
defaultDuration.unit optional | enum | Specifies the unit for the default duration of historical data retrieval. Accepted values: Minute | Hour | Day . |
Agent connection methodβ
Use the agent method to run an agent alongside your Prometheus server. Once connected, the agent will periodically connect to Nobl9 using an outbound connection.
Nobl9 Webβ
To connect Azure Monitor managed service for Prometheus, do the following:
- Navigate to Integrations > Sources.
- Click .
- Click the required Source button.
- Choose Agent.
-
Enter the URL of your required base Prometheus server.
-
Enter your Azure Tenant ID.
It is an8-4-4-4-12
-character code containing digits0-9
and lettersAa-Ff
.
- Select a Project.
Specifying a project is helpful when multiple users are spread across multiple teams or projects. When the Project field is left blank, Nobl9 uses thedefault
project. - Enter a Display Name.
You can enter a user-friendly name with spaces in this field. - Enter a Name.
The name is mandatory and can only contain lowercase, alphanumeric characters, and dashes (for example,my-project-1
). Nobl9 duplicates the display name here, transforming it into the supported format, but you can edit the result. - Enter a Description.
Here you can add details such as who is responsible for the integration (team/owner) and the purpose of creating it. - Specify the Query delay to set a customized delay for queries when pulling the data from the data source.
- The default value in Azure Monitor managed service for Prometheus integration for Query delay is
0 minutes
.
infoChanging the Query delay may affect your SLI data. For more details, check the Query delay documentation. - The default value in Azure Monitor managed service for Prometheus integration for Query delay is
- Enter a Maximum Period for Historical Data Retrieval.
- This value defines how far back in the past your data will be retrieved when replaying your SLO based on this data source.
- The maximum period value depends on the data source.
Find the maximum value for your data source. - A greater period can extend the loading time when creating an SLO.
- The value must be a positive integer.
- Enter a Default Period for Historical Data Retrieval.
- It is used by SLOs connected to this data source.
- The value must be a positive integer or
0
. - By default, this value is set to 0. When you set it to
>0
, you will create SLOs with Replay.
- Click Add Data Source
sloctlβ
-
Create a YAML resource definition for your Azure Monitor managed service for Prometheus using the provided template.
-
Run
sloctl apply
to proceed.
- apiVersion: n9/v1alpha
kind: Agent
metadata:
name: azure-prometheus-data-source
# Optional
displayName: Azure Prometheus data source (agent connection)
project: my-project
spec:
# Optional
description: My sample Azure Prometheus data source (agent connection)
# Enum: stable || beta. Currently, available in beta only
releaseChannel: beta
azurePrometheus:
url: "<YOUR_PROMETHEUS_SERVER_URL>"
tenantId: "<YOUR_AZURE_TENANT_ID>"
# Replay configuration
historicalDataRetrieval:
maxDuration:
# Numeric, up to 30 days for Azure monitor managed service for Prometheus
value: 30
unit: Day
defaultDuration:
value: 15
unit: Day
# The default query delay value for Azure Monitor managed service for Prometheus is 0 seconds
queryDelay:
value: 0
unit: Second
Field | Type | Description |
---|---|---|
queryDelay.unit mandatory | enum | Specifies the unit for the query delay. Possible values: Second | Minute . β’ Check query delay documentation for default unit of query delay for each source. |
queryDelay.value mandatory | numeric | Specifies the value for the query delay. β’ Must be a number less than 1440 minutes (24 hours). β’ Check query delay documentation for default unit of query delay for each source. |
releaseChannel mandatory | enum | Specifies the release channel. Accepted values: beta | stable . |
Source-specific fields | ||
azurePrometheus.url mandatory | string | Base URL to Prometheus server. See authentication section above for more details. |
azurePrometheus.tenantID mandatory | string | The identifier of your Microsoft Entra tenant. |
Replay-related fields | ||
historicalDataRetrieval optional | n/a | Optional structure related to configuration related to Replay. β Use only with supported sources. β’ If omitted, Nobl9 uses the default values of value: 0 and unit: Day for maxDuration and defaultDuration . |
maxDuration.value optional | numeric | Specifies the maximum duration for historical data retrieval. Must be integer β₯ 0 . See Replay documentation for values of max duration per data source. |
maxDuration.unit optional | enum | Specifies the unit for the maximum duration of historical data retrieval. Accepted values: Minute | Hour | Day . |
defaultDuration.value optional | numeric | Specifies the default duration for historical data retrieval. Must be integer β₯ 0 and β€ maxDuration . |
defaultDuration.unit optional | enum | Specifies the unit for the default duration of historical data retrieval. Accepted values: Minute | Hour | Day . |