RobustPerception/azure_metrics_exporter

Name: azure_metrics_exporter

Owner: RobustPerception

Description: Azure metrics exporter for Prometheus

Created: 2017-10-20 16:26:10.0

Updated: 2018-05-11 07:12:36.0

Pushed: 2018-05-09 02:21:24.0

Homepage: null

Size: 707

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Azure-metrics-exporter

Work in progress

Azure metrics exporter for Prometheus.

Allows for the exporting of metrics from Azure applications using the Azure monitor API.

Rate limits

Note that Azure imposes a 15,000 API read limit so the number of metrics you're querying for should be proportional to your scrape interval.

Retrieving Metric definitions

In order to get all the metric definitions for the resources specified in your configuration file, run the following:

./Azure-metrics-exporter --list.definitions

This will print your resource id's application/service name along with a list of each of the available metric definitions that you can query for for that resource.

Example azure-metrics-exporter config

azure_resource_id and subscription_id can be found under properties in the Azure portal for your application/service.

tenant_id is found under Azure Active Directory > Properties and is listed as Directory ID.

The client_id and client_secret are obtained by registering an application under 'Azure Active Directory'.

client_id is the application_id of your application and the client_secret is generated by selecting your application/service under Azure Active Directory, selecting 'keys', and generating a new key.

Then for the resource group your application is apart of, create a new IAM reader role for the created app under 'Azure Active Directory'.

entials:
bscription_id: <secret>
ient_id: <secret>
ient_secret: <secret>
nant_id: <secret>

ets:
resource: "azure_resource_id"
metrics:
- name: "BytesReceived"
- name: "BytesSent"
resource: "azure_resource_id"
metrics:
- name: "Http2xx"
- name: "Http5xx"

Example Prometheus config

al:
rape_interval:     60s # Set a high scrape_interval either globally or per-job to avoid hitting Azure Monitor API limits.

pe_configs:
job_name: azure
static_configs:
  - targets: ['localhost:9276']

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.