Here is an overview of how you can configure Promitor.
The Promitor runtime is flexible and allows you to configure it to meet your needs:
- PROMITOR_HTTP_PORT - Defines the port to serve HTTP traffic (default 80)
Promitor automatically scrapes Azure Monitor and makes the information available based on the metrics configuration.
The behavior of this can be configured with the following environment variables:
- PROMITOR_CONFIGURATION_PATH - Defines the location of the YAML file that declares what Azure Monitor metrics to scrape. If nothing is specified,
/config/metrics-declaration.yamlwill be used.
- PROMITOR_SCRAPE_BASEPATH - Controls the path where the scraping endpoint for Prometheus is being exposed. If nothing is specified,
/prometheus/scrapewill be used.
- PROMITOR_SCRAPE_SCHEDULE - A cron expression that controls the fequency in which all the configured metrics will be scraped from Azure Monitor. You can use crontab-generator.org to generate a cron that fits your needs. If nothing is configured,
*/5 * * * *will be used.
We’re also providing feature flags to opt-out of certain features:
- PROMITOR_FEATURE_METRICSTIMESTAMP - Defines whether or not a timestamp should be included when the value was scraped on Azure Monitor. Supported values are
Trueto opt-in &
Falseto opt-out, if nothing is configured this will be turned on.
Authentication with Azure Monitor
Authentication with Azure Monitor is fully integrated with Azure AD. In order to use Promitor, you’ll need to create an Azure AD Application, that will be used for integrating with the Azure Monitor API.
The following environment variables need to be provided:
- PROMITOR_AUTH_APPID - Id of the Azure AD entity to authenticate with
- PROMITOR_AUTH_APPKEY - Secret of the Azure AD entity to authenticate with
This information can be found on the newly created AD Application as documented here.
The entity in the Azure AD needs to have
Monitoring Reader permission on the resource group that will be queried. More information can be found here.
Promitor can send telemetry to Azure Application Insights when there is a need to.
It currently supports:
- Exceptions during scraping
In order to enable this feature, the following environment variables need to be provided:
- PROMITOR_TELEMETRY_INSTRUMENTATIONKEY - Defines the instrumentation key to use when sending telemetry to Azure Application Insights