Skip to content

Commit

Permalink
docs: Update Generic scraper doc (#1941)
Browse files Browse the repository at this point in the history
* Update Generic scraper doc

- Highlight the fact that the filter parameter is optional.
- Inform people about the filter syntax (#1740).
- Inform people about the other optional fields available (#1849).

* fix line length

* Update docs/configuration/v2.x/metrics/generic-azure-resource.md

* Update docs/configuration/v2.x/metrics/generic-azure-resource.md

* Update docs/configuration/v2.x/metrics/generic-azure-resource.md

Co-authored-by: Tom Kerkhove <[email protected]>
  • Loading branch information
AntoineThebaud and tomkerkhove authored Jan 27, 2022
1 parent 8ec164a commit 241121f
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions docs/configuration/v2.x/metrics/generic-azure-resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@ title: Generic Azure Resource Declaration

You can declare to scrape a generic Azure resource via the `Generic` resource type.

The following fields need to be provided:
Promitor simplifies defining resource URIs by using the subscription & resource
group defined in `azureMetadata` so that your configuration is small & readable.

Mandatory fields :

- `resourceUri` - The uri of the Azure resource to scrape.
- `filter` - The filter to use to have fine-grained metrics. Example:
`EntityName eq 'orders'`

Promitor simplifies defining resource uris by using the subscription & resource
group defined in `azureMetadata` so that your configuration is small & readable.
Optional fields :

- `resourceGroupName` - the resource group for this resource. It overrides the one defined in `azureMetadata`.
- `subscriptionId` - the subscription ID for this resource. It overrides the one defined in `azureMetadata`.
- `filter` - The filter to use to have fine-grained metrics. Example: `EntityName eq 'orders'`.
See [Azure Monitor REST API Filter Syntax](https://docs.microsoft.com/en-us/rest/api/monitor/filter-syntax).

Example:

Expand All @@ -29,12 +34,15 @@ azureMetricConfiguration:
aggregation:
type: Total
resources:
# Will scrape subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.ServiceBus/namespaces/promitor-messaging
# Where 'sub' & 'rg' are coming from azureMetadata
- resourceUri: Microsoft.ServiceBus/namespaces/promitor-messaging
# Will scrape subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.ServiceBus/namespaces/my-promitor-messaging
# Where <sub> & <rg> are coming from azureMetadata
- resourceUri: Microsoft.ServiceBus/namespaces/my-promitor-messaging
filter: EntityName eq 'orders'
- resourceUri: Microsoft.ServiceBus/namespaces/promitor-messaging
filter: EntityName eq 'items'
# Will scrape subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.ServiceBus/namespaces/my-other-promitor-messaging
# Where <sub> & <rg> are coming from the definition of this resource.
- resourceUri: Microsoft.ServiceBus/namespaces/my-other-promitor-messaging
subscriptionId: example-subscription
resourceGroupName: example-resource-group
```
<!-- markdownlint-disable MD033 -->
Expand Down

0 comments on commit 241121f

Please sign in to comment.