Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide documentation on metric labelling #660

Merged
merged 2 commits into from
Aug 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions docs/configuration/v1.x/metrics/service-bus-queue.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ The following fields need to be provided:
- `namespace` - The name of the Service Bus namespace
- `queueName` - The name of the queue

Supported metrics:
- `IncomingMessages`
- `IncomingRequests`
- `ActiveMessages`
- `Messages`
- `Size`
All supported metrics are documented in the official [Azure Monitor documentation](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported#microsoftservicebusnamespaces).

The following scraper-specific metric label(s) will be added:
- `entity_name` - Name of the queue

Example:
```yaml
Expand Down
3 changes: 3 additions & 0 deletions docs/configuration/v1.x/metrics/storage-queue.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Supported metrics:
- `TimeSpentInQueue` - Time in seconds that the oldest message has been waiting in the queue to be processed.
- `MessageCount`

The following scraper-specific metric label(s) will be added:
- `queue_name` - Name of the queue

Example:
```yaml
name: demo_queue_size
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/v1.x/runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ server:
httpPort: 80 # Optional. Default: 80
```

# Scraping
# Scraping Prometheus
Promitor automatically scrapes Azure Monitor and makes the information available based on the metrics configuration.

The behavior of this can be configured to fit your needs:
Expand Down
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ And there is more on the way - Check our [backlog](https://github.com/tomkerkhov
- **Metrics**
- [General Declaration](configuration/v0.x/metrics)
- [Supported Providers](configuration/v0.x/metrics#supported-azure-services)
- [What labels do we provide?](metrics/labels)
- **Configuration**
- [Runtime](configuration/v0.x/#runtime)
- [Scraping](configuration/v0.x/#scraping)
Expand Down
35 changes: 35 additions & 0 deletions docs/metrics/labels.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
layout: default
title: Metric Labels
---

Here is an overview of how we label metrics.

There are a couple of scenarios where labels are being added:
- Built-in labels
- Scaler-specific labels
- Bring-your-own labels

In case of duplicate label names the above priority will be used.

# Built-in labels
Every metric that is being reported in the scraping endpoint comes with the following built-in labels:
- `resource_uri` - Full resource URI of the instance. *(ie `subscriptions/xxx/resourceGroups/yyy/providers/Microsoft.ServiceBus/namespaces/promitor`)*
- `subscription_id` - Id of the subscription.
- `resource_group` - Name of the resource group.
- `instance_name` - Name of the instance, if applicable.

# Scaler-specific labels
Every scraper can provide additional labels to provide more information.

Currently we support this for:
- Azure Service Bus
- Azure Storage Queue

For more information, we recommend reading the [scraper-specific documentation](./../configuration/v1.x/metrics/#supported-azure-services).

# Custom Labels

As of v1.0, you can define your own labels by configuring them for a specific metric.

For more information, see ["Metrics"](./../configuration/v1.x/metrics/#metrics).