• Stars
    star
    125
  • Rank 286,335 (Top 6 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 6 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Azure Monitor metrics exporter for Prometheus with dimension support, template engine and ServiceDiscovery

Azure Monitor metrics exporter

license DockerHub Quay.io Artifact Hub

Prometheus exporter for Azure Monitor metrics. Supports metrics fetching from all resource with one scrape (automatic service discovery), custom metric names with template system, full dimensions support and caching.

Configuration (except Azure connection) of this exporter is made entirely in Prometheus instead of a seperate configuration file, see examples below.

TOC:

Features

  • Uses of official Azure SDK for go
  • Supports all Azure environments (Azure public cloud, Azure governmant cloud, Azure china cloud, ...) via Azure SDK configuration
  • Caching of Azure ServiceDiscovery to reduce Azure API calls
  • Caching of fetched metrics (no need to request every minute from Azure Monitor API; you can keep scrape time of 30s for metrics)
  • Customizable metric names (with template system with metric information)
  • Ability to fetch metrics from one or more resources via target parameter (see /probe/metrics/resource)
  • Ability to fetch metrics from resources found with ServiceDiscovery via Azure resources API based on $filter (see /probe/metrics/list)
  • Ability to fetch metrics from resources found with ServiceDiscovery via Azure resources API based on $filter with configuration inside Azure resource tags (see /probe/metrics/scrape)
  • Ability to fetch metrics from resources found with ServiceDiscovery via Azure ResourceGraph API based on Kusto query (see /probe/metrics/resourcegraph)
  • Configuration based on Prometheus scraping config or ServiceMonitor manifest (Prometheus operator)
  • Metric manipulation (adding, removing, updating or filtering of labels or metrics) can be done in scraping config (eg metric_relabel_configs)
  • Full metric dimension support
  • Docker image is based on Google's distroless static image to reduce attack surface (no shell, no other binaries inside image)
  • Available via Docker Hub and Quay (see badges on top)
  • Can run non-root and with readonly root filesystem, doesn't need any capabilities (you can safely use drop: ["All"])
  • Publishes Azure API rate limit metrics (when exporter sends Azure API requests, available via /metrics)

useful with additional exporters:

  • azure-resourcegraph-exporter for exporting Azure resource information from Azure ResourceGraph API with custom Kusto queries (get the tags from resources and ResourceGroups with this exporter)
  • azure-resourcemanager-exporter for exporting Azure subscription information (eg ratelimit, subscription quotas, ServicePrincipal expiry, RoleAssignments, resource health, ...)
  • azure-keyvault-exporter for exporting Azure KeyVault information (eg expiry date for secrets, certificates and keys)
  • azure-loganalytics-exporter for exporting Azure LogAnalytics workspace information with custom Kusto queries (eg ingestion rate or application error count)

Configuration

Normally no configuration is needed but can be customized using environment variables.

Usage:
  azure-metrics-exporter [OPTIONS]

Application Options:
      --log.debug                          debug mode [$LOG_DEBUG]
      --log.devel                          development mode [$LOG_DEVEL]
      --log.json                           Switch log output to json format [$LOG_JSON]
      --azure-environment=                 Azure environment name (default: AZUREPUBLICCLOUD) [$AZURE_ENVIRONMENT]
      --azure-ad-resource-url=             Specifies the AAD resource ID to use. If not set, it defaults to ResourceManagerEndpoint for
                                           operations with Azure Resource Manager [$AZURE_AD_RESOURCE]
      --azure.servicediscovery.cache=      Duration for caching Azure ServiceDiscovery of workspaces to reduce API calls (time.Duration)
                                           (default: 30m) [$AZURE_SERVICEDISCOVERY_CACHE]
      --azure.resource-tag=                Azure Resource tags (space delimiter) (default: owner) [$AZURE_RESOURCE_TAG]
      --metrics.template=                  Template for metric name (default: {name}) [$METRIC_TEMPLATE]
      --metrics.help=                      Metric help (with template support) (default: Azure monitor insight metric) [$METRIC_HELP]
      --concurrency.subscription=          Concurrent subscription fetches (default: 5) [$CONCURRENCY_SUBSCRIPTION]
      --concurrency.subscription.resource= Concurrent requests per resource (inside subscription requests) (default: 10)
                                           [$CONCURRENCY_SUBSCRIPTION_RESOURCE]
      --enable-caching                     Enable internal caching [$ENABLE_CACHING]
      --server.bind=                       Server address (default: :8080) [$SERVER_BIND]
      --server.timeout.read=               Server read timeout (default: 5s) [$SERVER_TIMEOUT_READ]
      --server.timeout.write=              Server write timeout (default: 10s) [$SERVER_TIMEOUT_WRITE]

Help Options:
  -h, --help                               Show this help message

for Azure API authentication (using ENV vars) see following documentations:

How to test

Enable the webui (--development.webui) to get a basic web frontend to query the exporter which helps you to find the right settings for your configuration.

webui is available under url /query

Metrics

Metric Description
azurerm_stats_metric_collecttime General exporter stats
azurerm_stats_metric_requests Counter of resource metric requests with result (error, success)
azurerm_resource_metric (customizable) Resource metrics exported by probes (can be changed using name parameter and template system)
azurerm_api_ratelimit Azure ratelimit metrics (only on /metrics, resets after query)
azurerm_api_request_* Azure request count and latency as histogram

ResourceTags handling

see armclient tagmanager documentation

AzureTracing metrics

see armclient tracing documentation |

Metric name and help template system

(with 21.5.3 and later)

By default Azure monitor metrics are generated with the name specified in the request (see parameter name). This can be modified via environment variable $METRIC_TEMPLATE or as request parameter template.

HINT: Used templates are removed from labels!

Metric name recommendation: {name}_{metric}_{aggregation}_{unit}

Help recommendation: Azure metrics for {metric} with aggregation {aggregation} as {unit}

Following templates are available:

Template Description
{name} Name of template specified by request parameter name
{type} The ResourceType or MetricNamespace specified in the request (not applicable to all APIs)
{metric} Name of Azure monitor metric
{dimension} Dimension value of Azure monitor metric (if dimension is used)
{unit} Unit name of Azure monitor metric (eg count, percent, ...)
{aggregation} Aggregation of Azure monitor metric (eg total, average)
{interval} Interval of requested Azure monitor metric
{timespan} Timespan of requested Azure monitor metric

default template

Prometheus config:

- job_name: azure-metrics-keyvault
  scrape_interval: 1m
  metrics_path: /probe/metrics/list
  params:
    name: ["azure_metric_keyvault"]
    subscription:
    - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    filter: ["resourceType eq 'Microsoft.KeyVault/vaults'"]
    metric:
    - Availability
    - ServiceApiHit
    - ServiceApiLatency
    interval: ["PT15M"]
    timespan: ["PT15M"]
    aggregation:
    - average
    - total
  static_configs:
  - targets: ["azure-metrics:8080"]

generated metrics:

# HELP azure_metric_keyvault Azure monitor insight metric
# TYPE azure_metric_keyvault gauge
azure_metric_keyvault{aggregation="average",dimension="",interval="PT12H",metric="Availability",resourceID="/subscriptions/...",timespan="PT12H",unit="Percent"} 100
azure_metric_keyvault{aggregation="average",dimension="",interval="PT12H",metric="Availability",resourceID="/subscriptions/...",timespan="PT12H",unit="Percent"} 100
azure_metric_keyvault{aggregation="average",dimension="",interval="PT12H",metric="ServiceApiHit",resourceID="/subscriptions/...",timespan="PT12H",unit="Count"} 0
azure_metric_keyvault{aggregation="average",dimension="",interval="PT12H",metric="ServiceApiHit",resourceID="/subscriptions/...",timespan="PT12H",unit="Count"} 0
azure_metric_keyvault{aggregation="total",dimension="",interval="PT12H",metric="ServiceApiHit",resourceID="/subscriptions/...",timespan="PT12H",unit="Count"} 0
azure_metric_keyvault{aggregation="total",dimension="",interval="PT12H",metric="ServiceApiHit",resourceID="/subscriptions/...",timespan="PT12H",unit="Count"} 0
# HELP azurerm_ratelimit Azure ResourceManager ratelimit
# TYPE azurerm_ratelimit gauge
azurerm_ratelimit{scope="subscription",subscriptionID="...",type="read"} 11997

template {name}_{metric}_{unit}

Prometheus config:

- job_name: azure-metrics-keyvault
  scrape_interval: 1m
  metrics_path: /probe/metrics/list
  params:
    name: ["azure_metric_keyvault"]
    template: ["{name}_{metric}_{unit}"]
    help: ["Custom help with {metric}"]
    subscription:
    - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    filter: ["resourceType eq 'Microsoft.KeyVault/vaults'"]
    metric:
    - Availability
    - ServiceApiHit
    - ServiceApiLatency
    interval: ["PT15M"]
    timespan: ["PT15M"]
    aggregation:
    - average
    - total
  static_configs:
  - targets: ["azure-metrics:8080"]

generated metrics:

# HELP azure_metric_keyvault_availability_percent Custom help with availability
# TYPE azure_metric_keyvault_availability_percent gauge
azure_metric_keyvault_availability_percent{aggregation="average",dimension="",interval="PT12H",resourceID="/subscriptions/...",timespan="PT12H"} 100
azure_metric_keyvault_availability_percent{aggregation="average",dimension="",interval="PT12H",resourceID="/subscriptions/...",timespan="PT12H"} 100

# HELP azure_metric_keyvault_serviceapihit_count Custom help with serviceapihit
# TYPE azure_metric_keyvault_serviceapihit_count gauge
azure_metric_keyvault_serviceapihit_count{aggregation="average",dimension="",interval="PT12H",resourceID="/subscriptions/...",timespan="PT12H"} 0
azure_metric_keyvault_serviceapihit_count{aggregation="average",dimension="",interval="PT12H",resourceID="/subscriptions/...",timespan="PT12H"} 0
azure_metric_keyvault_serviceapihit_count{aggregation="total",dimension="",interval="PT12H",resourceID="/subscriptions/...",timespan="PT12H"} 0
azure_metric_keyvault_serviceapihit_count{aggregation="total",dimension="",interval="PT12H",resourceID="/subscriptions/...",timespan="PT12H"} 0

# HELP azurerm_ratelimit Azure ResourceManager ratelimit
# TYPE azurerm_ratelimit gauge
azurerm_ratelimit{scope="subscription",subscriptionID="...",type="read"} 11996

template {name}_{metric}_{aggregation}_{unit}

Prometheus config:

- job_name: azure-metrics-keyvault
  scrape_interval: 1m
  metrics_path: /probe/metrics/list
  params:
    name: ["azure_metric_keyvault"]
    template: ["{name}_{metric}_{aggregation}_{unit}"]
    subscription:
    - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    filter: ["resourceType eq 'Microsoft.KeyVault/vaults'"]
    metric:
    - Availability
    - ServiceApiHit
    - ServiceApiLatency
    interval: ["PT15M"]
    timespan: ["PT15M"]
    aggregation:
    - average
    - total
  static_configs:
  - targets: ["azure-metrics:8080"]

generated metrics:

# HELP azure_metric_keyvault_availability_average_percent Azure monitor insight metric
# TYPE azure_metric_keyvault_availability_average_percent gauge
azure_metric_keyvault_availability_average_percent{dimension="",interval="PT12H",resourceID="/subscriptions/...",timespan="PT12H"} 100
azure_metric_keyvault_availability_average_percent{dimension="",interval="PT12H",resourceID="/subscriptions/...",timespan="PT12H"} 100
# HELP azure_metric_keyvault_availability_total_percent Azure monitor insight metric
# TYPE azure_metric_keyvault_availability_total_percent gauge
azure_metric_keyvault_availability_total_percent{dimension="",interval="PT12H",resourceID="/subscriptions/...",timespan="PT12H"} 9
# HELP azure_metric_keyvault_serviceapihit_average_count Azure monitor insight metric
# TYPE azure_metric_keyvault_serviceapihit_average_count gauge
azure_metric_keyvault_serviceapihit_average_count{dimension="",interval="PT12H",resourceID="/subscriptions/...",timespan="PT12H"} 0
azure_metric_keyvault_serviceapihit_average_count{dimension="",interval="PT12H",resourceID="/subscriptions/...",timespan="PT12H"} 1
# HELP azure_metric_keyvault_serviceapihit_total_count Azure monitor insight metric
# TYPE azure_metric_keyvault_serviceapihit_total_count gauge
azure_metric_keyvault_serviceapihit_total_count{dimension="",interval="PT12H",resourceID="/subscriptions/...",timespan="PT12H"} 0
azure_metric_keyvault_serviceapihit_total_count{dimension="",interval="PT12H",resourceID="/subscriptions/...",timespan="PT12H"} 9
# HELP azure_metric_keyvault_serviceapilatency_average_milliseconds Azure monitor insight metric
# TYPE azure_metric_keyvault_serviceapilatency_average_milliseconds gauge
azure_metric_keyvault_serviceapilatency_average_milliseconds{dimension="",interval="PT12H",resourceID="/subscriptions/...",timespan="PT12H"} 38.666666666666664
# HELP azure_metric_keyvault_serviceapilatency_total_milliseconds Azure monitor insight metric
# TYPE azure_metric_keyvault_serviceapilatency_total_milliseconds gauge
azure_metric_keyvault_serviceapilatency_total_milliseconds{dimension="",interval="PT12H",resourceID="/subscriptions/...",timespan="PT12H"} 348
# HELP azurerm_ratelimit Azure ResourceManager ratelimit
# TYPE azurerm_ratelimit gauge
azurerm_ratelimit{scope="subscription",subscriptionID="...",type="read"} 11999

HTTP Endpoints

Endpoint Description
/metrics Default prometheus golang metrics
/probe/metrics Probe metrics by subscription and region, split by resource (one query per subscription and region; see azurerm_resource_metric)
/probe/metrics/resource Probe metrics for one resource (one query per resource; see azurerm_resource_metric)
/probe/metrics/list Probe metrics for list of resources (sone query per resource; see azurerm_resource_metric)
/probe/metrics/scrape Probe metrics for list of resources and config on resource by tag name (one query per resource; see azurerm_resource_metric)
/probe/metrics/resourcegraph Probe metrics for list of resources based on a kusto query and the resource graph API (one query per resource)

/probe/metrics parameters

one metric request per subscription and region

GET parameter Default Required Multiple Description
subscription yes yes Azure Subscription ID
region no yes Azure Regions (eg. westeurope, northeurope). If omit, ResourceGrapth will be used to discover regions
resourceType yes no Azure Resource type
timespan PT1M no no Metric timespan
interval no no Metric timespan
metricNamespace no no Metric namespace
metric no yes Metric name
aggregation no yes Metric aggregation (minimum, maximum, average, total, count, multiple possible separated with ,)
name azurerm_resource_metric no no Prometheus metric name
metricFilter no no Prometheus metric filter (dimension support; supports only 2 filters in subscription query mode as the first filter is used to split by resource id)
metricTop no no Prometheus metric dimension count (dimension support)
metricOrderBy no no Prometheus metric order by (dimension support)
validateDimensions true no no When set to false, invalid filter parameter values will be ignored.
cache (same as timespan) no no Use of internal metrics caching
template set to $METRIC_TEMPLATE no no see metric name and help template system
help set to $METRIC_HELP no no see metric name and help template system

Hint: Multiple values can be specified multiple times or with a comma in a single value.

/probe/metrics/resource parameters

metrics are requested per resource in chunks of 20 metric names (35 metric names = 2 requests per resource)

GET parameter Default Required Multiple Description
subscription yes yes Azure Subscription ID
target yes yes Azure Resource URI
timespan PT1M no no Metric timespan
interval no no Metric timespan
metricNamespace no yes Metric namespace
metric no yes Metric name
aggregation no yes Metric aggregation (minimum, maximum, average, total, count, multiple possible separated with ,)
name azurerm_resource_metric no no Prometheus metric name
metricFilter no no Prometheus metric filter (dimension support)
metricTop no no Prometheus metric dimension count (dimension support)
metricOrderBy no no Prometheus metric order by (dimension support)
validateDimensions true no no When set to false, invalid filter parameter values will be ignored.
cache (same as timespan) no no Use of internal metrics caching
template set to $METRIC_TEMPLATE no no see metric name and help template system
help set to $METRIC_HELP no no see metric name and help template system

Hint: Multiple values can be specified multiple times or with a comma in a single value.

/probe/metrics/list parameters

metrics are requested per resource in chunks of 20 metric names (35 metric names = 2 requests per resource)

HINT: service discovery information is cached for duration set by $AZURE_SERVICEDISCOVERY_CACHE (set to 0 to disable)

GET parameter Default Required Multiple Description
subscription yes yes Azure Subscription ID (or multiple separate by comma)
resourceType or filter yes no Azure Resource type or filter query (https://docs.microsoft.com/en-us/rest/api/resources/resources/list)
timespan PT1M no no Metric timespan
interval no no Metric timespan
metricNamespace no yes Metric namespace
metric no yes Metric name
aggregation no yes Metric aggregation (minimum, maximum, average, total, count, multiple possible separated with ,)
name azurerm_resource_metric no no Prometheus metric name
metricFilter no no Prometheus metric filter (dimension support)
metricTop no no Prometheus metric dimension count (dimension support)
metricOrderBy no no Prometheus metric order by (dimension support)
validateDimensions true no no When set to false, invalid filter parameter values will be ignored.
cache (same as timespan) no no Use of internal metrics caching
template set to $METRIC_TEMPLATE no no see metric name and help template system
help set to $METRIC_HELP no no see metric name and help template system

Hint: Multiple values can be specified multiple times or with a comma in a single value.

/probe/metrics/scrape parameters

HINT: service discovery information is cached for duration set by $AZURE_SERVICEDISCOVERY_CACHE (set to 0 to disable)

GET parameter Default Required Multiple Description
subscription yes yes Azure Subscription ID (or multiple separate by comma)
resourceType or filter yes no Azure Resource type or filter query (https://docs.microsoft.com/en-us/rest/api/resources/resources/list)
metricTagName yes no Resource tag name for getting "metrics" list
aggregationTagName yes no Resource tag name for getting "aggregations" list
timespan PT1M no no Metric timespan
interval no no Metric timespan
metricNamespace no yes Metric namespace
metric no yes Metric name
aggregation no yes Metric aggregation (minimum, maximum, average, total, multiple possible separated with ,)
name azurerm_resource_metric no no Prometheus metric name
metricFilter no no Prometheus metric filter (dimension support)
metricTop no no Prometheus metric dimension count (integer, dimension support)
metricOrderBy no no Prometheus metric order by (dimension support)
validateDimensions true no no When set to false, invalid filter parameter values will be ignored.
cache (same as timespan) no no Use of internal metrics caching
template set to $METRIC_TEMPLATE no no see metric name and help template system
help set to $METRIC_HELP no no see metric name and help template system

Hint: Multiple values can be specified multiple times or with a comma in a single value.

/probe/metrics/resourcegraph parameters

This endpoint is using Azure ResoruceGraph API for servicediscovery (with 21.9.0 and later)

metrics are requested per resource in chunks of 20 metric names (35 metric names = 2 requests per resource)

HINT: service discovery information is cached for duration set by $AZURE_SERVICEDISCOVERY_CACHE (set to 0 to disable)

GET parameter Default Required Multiple Description
subscription yes yes Azure Subscription ID (or multiple separate by comma)
resourceType yes no Azure Resource type
filter no no Additional Kusto query part (eg. where id contains "/xzy/")
timespan PT1M no no Metric timespan
interval no no Metric timespan
metricNamespace no yes Metric namespace
metric no yes Metric name
aggregation no yes Metric aggregation (minimum, maximum, average, total, count, multiple possible separated with ,)
name azurerm_resource_metric no no Prometheus metric name
metricFilter no no Prometheus metric filter (dimension support)
metricTop no no Prometheus metric dimension count (dimension support)
metricOrderBy no no Prometheus metric order by (dimension support)
validateDimensions true no no When set to false, invalid filter parameter values will be ignored.
cache (same as timespan) no no Use of internal metrics caching
template set to $METRIC_TEMPLATE no no see metric name and help template system
help set to $METRIC_HELP no no see metric name and help template system

Hint: Multiple values can be specified multiple times or with a comma in a single value.

Prometheus configuration examples

Redis

using target (single instances):

- job_name: azure-metrics-redis
  scrape_interval: 1m
  metrics_path: /probe/metrics/resource
  params:
    name: ["my_own_metric_name"]
    subscription:
    - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    target:
    - /subscriptions/.../resourceGroups/.../providers/Microsoft.Cache/Redis/...
    - /subscriptions/.../resourceGroups/.../providers/Microsoft.Cache/Redis/...
    - /subscriptions/.../resourceGroups/.../providers/Microsoft.Cache/Redis/...
    - /subscriptions/.../resourceGroups/.../providers/Microsoft.Cache/Redis/...
    metric:
    - connectedclients
    - totalcommandsprocessed
    - cachehits
    - cachemisses
    - getcommands
    - setcommands
    - operationsPerSecond
    - evictedkeys
    - totalkeys
    - expiredkeys
    - usedmemory
    - usedmemorypercentage
    - usedmemoryRss
    - serverLoad
    - cacheWrite
    - cacheRead
    - percentProcessorTime
    - cacheLatency
    - errors
    interval: ["PT1M"]
    timespan: ["PT1M"]
    aggregation:
    - average
    - total
  static_configs:
  - targets: ["azure-metrics:8080"]

using ServiceDiscovery:

- job_name: azure-metrics-redis
  scrape_interval: 1m
  metrics_path: /probe/metrics/list
  params:
    name: ["my_own_metric_name"]
    subscription:
    - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    resourceType: ["Microsoft.Cache/Redis"]
    metric:
    - connectedclients
    - totalcommandsprocessed
    - cachehits
    - cachemisses
    - getcommands
    - setcommands
    - operationsPerSecond
    - evictedkeys
    - totalkeys
    - expiredkeys
    - usedmemory
    - usedmemorypercentage
    - usedmemoryRss
    - serverLoad
    - cacheWrite
    - cacheRead
    - percentProcessorTime
    - cacheLatency
    - errors
    interval: ["PT1M"]
    timespan: ["PT1M"]
    aggregation:
    - average
    - total
  static_configs:
  - targets: ["azure-metrics:8080"]

using ServiceDiscovery with custom resource filter query:

- job_name: azure-metrics-redis
  scrape_interval: 1m
  metrics_path: /probe/metrics/list
  params:
    name: ["my_own_metric_name"]
    subscription:
    - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    filter: ["resourceType eq 'Microsoft.Cache/Redis'"]
    metric:
    - connectedclients
    - totalcommandsprocessed
    - cachehits
    - cachemisses
    - getcommands
    - setcommands
    - operationsPerSecond
    - evictedkeys
    - totalkeys
    - expiredkeys
    - usedmemory
    - usedmemorypercentage
    - usedmemoryRss
    - serverLoad
    - cacheWrite
    - cacheRead
    - percentProcessorTime
    - cacheLatency
    - errors
    interval: ["PT1M"]
    timespan: ["PT1M"]
    aggregation:
    - average
    - total
  static_configs:
  - targets: ["azure-metrics:8080"]

VirtualNetworkGateways

- job_name: azure-metrics-virtualNetworkGateways
  scrape_interval: 1m
  metrics_path: /probe/metrics/list
  params:
    name: ["my_own_metric_name"]
    subscription:
    - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    resourceType: ["Microsoft.Network/virtualNetworkGateways"]
    metric:
    - AverageBandwidth
    - P2SBandwidth
    - P2SConnectionCount
    - TunnelAverageBandwidth
    - TunnelEgressBytes
    - TunnelIngressBytes
    - TunnelEgressPackets
    - TunnelIngressPackets
    - TunnelEgressPacketDropTSMismatch
    - TunnelIngressPacketDropTSMismatch
    interval: ["PT5M"]
    timespan: ["PT5M"]
    aggregation:
    - average
    - total
  static_configs:
  - targets: ["azure-metrics:8080"]

virtualNetworkGateway connections (dimension support)

Virtual Gateway connection metrics (dimension support)

- job_name: azure-metrics-virtualNetworkGateways-connections
  scrape_interval: 1m
  metrics_path: /probe/metrics/list
  params:
    name: ["my_own_metric_name"]
    subscription:
    - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    resourceType: ["Microsoft.Network/virtualNetworkGateways"]
    metric:
    - TunnelAverageBandwidth
    - TunnelEgressBytes
    - TunnelIngressBytes
    - TunnelEgressPackets
    - TunnelIngressPackets
    - TunnelEgressPacketDropTSMismatch
    - TunnelIngressPacketDropTSMismatch
    interval: ["PT5M"]
    timespan: ["PT5M"]
    aggregation:
    - average
    - total
    # by connection (dimension support)
    metricFilter: ["ConnectionName eq '*'"]
    metricTop: ["10"]
  static_configs:
  - targets: ["azure-metrics:8080"]

StorageAccount (metric namespace and dimension support)

- job_name: azure-metrics-virtualNetworkGateways-connections
  scrape_interval: 1m
  metrics_path: /probe/metrics/list
  params:
    name: ["my_own_metric_name"]
    subscription:
    - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    resourceType: ["Microsoft.Storage/storageAccounts"]
    metricNamespace: ["Microsoft.Storage/storageAccounts/blobServices"]
    metric:
    - BlobCapacity
    interval: ["PT1H"]
    timespan: ["PT1H"]
    aggregation:
    - average
    - count
    # by blobtype (dimension support)
    metricFilter: ["BlobType eq '*'"]
    metricTop: ["10"]
  static_configs:
  - targets: ["azure-metrics:8080"]

In these examples all metrics are published with metric name my_own_metric_name.

The List of supported metrics is available in the Microsoft Azure docs.

Development and testing query webui

azure-metrics-exporter provides a query webui at http://url-to-exporter/query where you can test different query settings and endpoints. the query webui also generates an example prometheus scrape_config.

More Repositories

1

Dockerfile

๐Ÿ“ฆ Dockerfiles from WebDevOps for PHP, Apache and Nginx
Shell
1,673
star
2

php-docker-boilerplate

๐Ÿฒ PHP Docker Boilerplate for Symfony, Wordpress, Joomla or any other PHP Project (NGINX, Apache HTTPd, PHP-FPM, MySQL, Solr, Elasticsearch, Redis, FTP)
JavaScript
562
star
3

TYPO3-docker-boilerplate

๐Ÿฒ TYPO3 Docker Boilerplate project (NGINX, Apache HTTPd, PHP-FPM, MySQL, Solr, Elasticsearch, Redis, FTP)
Shell
233
star
4

azure-devops-exporter

Prometheus exporter for Azure DevOps (VSTS) including agent pools, builds, releases, deployments, pullrequests and repo stats
Go
147
star
5

go-crond

โฐ Cron daemon written in golang (for eg. usage in docker images)
Go
124
star
6

vagrant-docker-vm

๐Ÿ’ป Development Vagrant VM with Docker, Samba and Mail sandbox (customizable)
Shell
87
star
7

clitools

๐Ÿ”ง CliTools for Docker, PHP / MySQL development, debugging and synchonization
PHP
84
star
8

go-sync

๐Ÿ” CLI synchronization utility to sync project files and databases for your local project with SSH and Docker support
Go
67
star
9

pagerduty-exporter

Prometheus exporter for PagerDuty informations
Go
55
star
10

go-replace

Replace in file console utility written in golang (for eg. usage in docker images)
Go
50
star
11

TYPO3-metaseo

TYPO3 MetaSEO Extension
PHP
38
star
12

samson-deployment

๐Ÿš€ ZenDesk Samson deployment as Docker service with Ansistrano, Capistrano and PHP Deployer
Shell
35
star
13

azure-resourcemanager-exporter

Prometheus exporter for Azure ResourceManager informations (infos, quotas, limits, usages, public IPs, portscanner)
Go
33
star
14

Neos-docker-boilerplate

๐Ÿฒ NEOS Docker Boilerplate project (NGINX, Apache HTTPd, PHP-FPM, MySQL, Solr, Elasticsearch, Redis, FTP)
JavaScript
18
star
15

alertmanager2es

Collects alertmanager alerts and pushes them to ElasticSearch (fork from cloudflare)
Go
15
star
16

azure-keyvault-exporter

Prometheus exporter for Azure Keyvault entries (expiry date)
Go
14
star
17

helm-azure-tpl

Helm plugin and standalone tool for Azure - injecting Azure information and KeyVault secrets into files using go template engine
Go
13
star
18

public-holiday-exporter

Prometheus exporter for public holidays
Go
9
star
19

azure-loganalytics-exporter

Prometheus exporter for Azure LogAnalytics (Kusto queries)
Go
9
star
20

azure-scheduledevents-exporter

Prometheus exporter for Azure ScheduledEvents (announced maintenance windows)
Go
9
star
21

go-syslogd

Syslog daemon (with named pipes support) written in golang (for eg. usage in docker images)
Go
8
star
22

azure-resourcegraph-exporter

Prometheus exporter for Azure ResourceGraph queries
Go
7
star
23

php-docker

[DEPRECATED] Prebuilt PHP Docker images for PHP Docker Boilerplate
7
star
24

shelly-plug-exporter

Prometheus exporter for Shelly plugs
Go
6
star
25

azure-janitor

Janitor for Azure Resources, ResourceGroups, Deployments and RoleAssignments by ttl
Go
6
star
26

azure-auditor

Audit service for Azure cloud with Prometheus violation metrics
Go
6
star
27

azure-scheduledevents-manager

Azure Scheduledevents manager for kubernetes and VMs (automatic drain and Prometheus metrics)
Go
6
star
28

go-devtool

๐Ÿ”ง Developer operations toolbox for MySQL, PostgreSQL and TYPO3
Go
5
star
29

deadmanssnitch-exporter

Prometheus exporter for DeadMansSnitch
Go
5
star
30

apprelease-exporter

Prometheus exporter for GItHub Tags/Releases and Docker repositories with CVE reports
Go
5
star
31

azure-k8s-autopilot

K8S operator for Azure VMSS/VM for automatic repair and update
Go
4
star
32

k8s-rollingupdate

Rolling update trigger for Kubernetes Deployments, Daemonsets and Statefulsets
Go
4
star
33

gq-gmc-exporter

Prometheus exporter for GQ GMC (Geigerโ€“Muller counter) devices
Go
4
star
34

azuredevops-deployment-operator

Operator which takes care of automated (re)deployments
Go
3
star
35

Docker-Image-Baselayout

Shell
3
star
36

azure-msi-operator

Operator for Azure Managed Service Identity inside Kubernetes (aad-pod-identity)
Go
3
star
37

myuplink-exporter

Prometheus exporter for myuplink.com
Go
2
star
38

pagerduty2es

Exporter for incidents and logentries from PagerDuty to ElasticSearch
Go
2
star
39

simulation-exporter

Prometheus exporter for simluated metrics (for testing)
Go
2
star
40

TYPO3-context-loader

๐Ÿ”ง Context configuration loader for TYPO3 (TYPO3_CONTEXT)
PHP
2
star
41

go-common

Common golang library for Prometheus exporters
Go
2
star
42

fenecon-exporter

Prometheus exporter for Fenecon systems
Go
2
star
43

azure-audit-exporter-old

Prometheus exporter for Azure audit metrics
Go
1
star
44

WebDevOps_Documentation

WebDevOps documentation (work in progress)
1
star
45

kube-pool-manager

Manages Kubernetes pools (annotation, labels, roles, configSource) by any node spec (json path support)
Go
1
star
46

go-stubfilegenerator

Stub file generator written in go
Go
1
star
47

azure-k8s-autorepair

Automatic repair of K8s cluster nodes in Azure
Go
1
star
48

vagrant-vm-disk

Vagrant Optional Repository for VM disks
1
star
49

kube-bootstrap-token-manager

Manager for Kubernetes bootstrap tokens with cloud support
Go
1
star