Skip to content
Open
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
80 changes: 41 additions & 39 deletions docs/resource-discovery/declaring-resource-discovery-groups.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Declaring resource discovery groups

Promitor Resource Discovery allows you to declare the Azure landscape to explore and define resource discovery groups
in YAML.
in YAML.

Resource discovery groups represent a group of Azure resources of a given type that can be scraped by Promitor Scraper
and supports an extensive list of supported services.
and supports an extensive list of supported services.

As part of the resource discovery group declaration, you can choose to filter resources by adding inclusion criteria
that resources must comply with based on:
that resources must comply with based on:

- **Subscription** - Defines a subset of subscriptions defined in the Azure landscape
- **Resource Group** - Defines a list of resource groups which contains the resources.
- **Tags** - Defines a list of [Azure tags](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/tag-resources)
with which the resources have to be annotated.
with which the resources have to be annotated.
- **Regions** - Defines a list of Azure regions in which the regions the resources are located.

Here is an example of a full declaration using a custom cloud:
Expand All @@ -22,9 +22,9 @@ version: v1
azureLandscape:
tenantId: e0372f7f-a362-47fb-9631-74a5c4ba8bbf
subscriptions:
- SUBSCRIPTON-ID-ABC
- SUBSCRIPTON-ID-DEF
- SUBSCRIPTON-ID-GHI
- SUBSCRIPTON-ID-ABC
- SUBSCRIPTON-ID-DEF
- SUBSCRIPTON-ID-GHI
cloud: Custom
endpoints:
authenticationEndpoint: https://custom-authentication-endpoint
Expand All @@ -34,62 +34,64 @@ azureLandscape:
storageEndpointSuffix: custom-storage-endpoint-suffix
keyVaultSuffix: custom-key-vault-suffix
resourceDiscoveryGroups:
- name: container-registry-landscape
type: ContainerRegistry
- name: filtered-logic-apps-landscape
type: LogicApp
criteria:
include:
subscriptions:
- SUBSCRIPTON-ID-ABC
- SUBSCRIPTON-ID-GHI
resourceGroups:
- promitor-resource-group-1
- promitor-resource-group-2
tags:
app: promitor-1|promitor-2
region: europe
regions:
- northeurope
- westeurope
- name: container-registry-landscape
type: ContainerRegistry
- name: dns-zone-landscape
type: DnsZone
- name: filtered-logic-apps-landscape
type: LogicApp
criteria:
include:
subscriptions:
- SUBSCRIPTON-ID-ABC
- SUBSCRIPTON-ID-GHI
resourceGroups:
- promitor-resource-group-1
- promitor-resource-group-2
tags:
app: promitor-1|promitor-2
region: europe
regions:
- northeurope
- westeurope
```

## Specification

As Promitor evolves we need to change the structure of our resource discovery declaration.

`version: {version}` - Version of declaration that is used. Allowed
values are `v1`. *(Required)*
values are `v1`. _(Required)_

### Azure Landscape

- `azureLandscape.tenantId` - The id of the Azure tenant that will be queried. *(Required)*
- `azureLandscape.subscriptions` - List of Azure subscriptions in the Azure tenant to discover resources in. *(Required)*
- `azureLandscape.tenantId` - The id of the Azure tenant that will be queried. _(Required)_
- `azureLandscape.subscriptions` - List of Azure subscriptions in the Azure tenant to discover resources in. _(Required)_
- `azureLandscape.cloud` - The name of the Azure cloud to use. Options are `Global`
(default), `China`, `UsGov`, `Germany`, & `Custom`.
(default), `China`, `UsGov`, `Germany`, & `Custom`.
- `azureLandscape.endpoints` - Required when `azureLandscape.cloud` is set to `Custom`. Defines the custom endpoints to use:
- `authenticationEndpoint` - The custom authentication endpoint.
- `managementEndpoint` - The custom service management endpoint.
- `resourceManagerEndpoint` - The custom Azure ARM resource management endpoint.
- `graphEndpoint` - The custom Active Directory graph endpoint.
- `storageEndpointSuffix` - The custom storage service url suffix.
- `keyVaultSuffix` - The custom Key Vault service url suffix.
- `authenticationEndpoint` - The custom authentication endpoint.
- `managementEndpoint` - The custom service management endpoint.
- `resourceManagerEndpoint` - The custom Azure ARM resource management endpoint.
- `graphEndpoint` - The custom Active Directory graph endpoint.
- `storageEndpointSuffix` - The custom storage service url suffix.
- `keyVaultSuffix` - The custom Key Vault service url suffix.

### Resource Discovery Groups

Every resource discovery group that is being declared needs to define the following fields:

- `name` - Name of the resource discovery group which will be used in metrics declaration of Promitor Scraper. *(Required)*
- `type` - Type of Azure resources that must be discovered, see "Supported Azure Services" for a full list of supported types. *(Required)*
- `name` - Name of the resource discovery group which will be used in metrics declaration of Promitor Scraper. _(Required)_
- `type` - Type of Azure resources that must be discovered, see "Supported Azure Services" for a full list of supported types. _(Required)_
- `criteria` - Criteria to fine-tune discovered resource.

#### Criteria

As of now, we only allow to define criteria that resources have to meet before they are included in the resource
discovery group:
discovery group:

- `subscriptions` - A list of subscription(s) in which the resource is allowed to be located.
- `resourceGroups` - A list of resource group(s) in which the resource is allowed to be located.
- `tags` - A list of [Azure tags](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/tag-resources)
and the expected values (exact or regular expression) with which the resources have to be annotated. (Uses `or`)
and the expected values (exact or regular expression) with which the resources have to be annotated. (Uses `or`)
- `regions` - A list of Azure region(s) in which the resource is allowed to be located.
39 changes: 20 additions & 19 deletions docs/scraping/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ file which is referred to as the metric declaration.
This declaration defines the overall Azure metadata and all the metrics you want to expose.

Every metric describes the Azure Monitor metric that it represents and what Azure resources that should be scraped.
It allows you to statically declaring the resources to scrape and/or use [automatic resource discovery](https://promitor.io/concepts/#using-resource-discovery).
It allows you to statically declaring the resources to scrape and/or use [automatic resource discovery](https://promitor.io/concepts/#using-resource-discovery).

## Supported Azure Services

Expand All @@ -28,6 +28,7 @@ We also provide a simplified way to scrape the following Azure resources:
- [Azure Data Factory](providers/data-factory.md)
- [Azure Data Share](providers/data-share.md)
- [Azure Database for PostgreSQL](providers/postgresql.md)
- [Azure DNS Zone](providers/dns-zone.md)
- [Azure Database for MariaDB](providers/maria-db.md)
- [Azure Database for MySQL](providers/mysql.md)
- [Azure Event Hubs](providers/event-hubs.md)
Expand Down Expand Up @@ -67,25 +68,25 @@ Want to help out? Create an issue and [contribute a new scraper](https://github.
As Promitor evolves we need to change the structure of our metrics declaration.

`version: {version}` - Version of declaration that is used. Allowed
values are `v1`. *(Required)*
values are `v1`. _(Required)_

### Azure

- `azureMetadata.tenantId` - The id of the Azure tenant that will be queried.
- `azureMetadata.subscriptionId` - The id of the default subscription to query.
- `azureMetadata.resourceGroupName` - The name of the default resource group to query.
- `azureMetadata.cloud` - The name of the Azure cloud to use. Options are `Global`
(default), `China`, `UsGov`, `Germany`, & `Custom`.
(default), `China`, `UsGov`, `Germany`, & `Custom`.
- `azureMetadata.endpoints` - Required when `azureMetadata.cloud` is set to `Custom`. Defines the custom endpoints to use:
- `authenticationEndpoint` - The custom authentication endpoint.
- `managementEndpoint` - The custom service management endpoint.
- `resourceManagerEndpoint` - The custom Azure ARM resource management endpoint.
- `graphEndpoint` - The custom Active Directory graph endpoint.
- `storageEndpointSuffix` - The custom storage service url suffix.
- `keyVaultSuffix` - The custom Key Vault service url suffix.
- `metricsQueryAudience` - The custom audiences available for metrics query.
- `metricsClientAudience` - The custom audiences available for metrics client.
- `logAnalyticsEndpoint` - The custom log analytics endpoint. *(Required only if Azure Log Analytics resource is configured for scraping)*
- `authenticationEndpoint` - The custom authentication endpoint.
- `managementEndpoint` - The custom service management endpoint.
- `resourceManagerEndpoint` - The custom Azure ARM resource management endpoint.
- `graphEndpoint` - The custom Active Directory graph endpoint.
- `storageEndpointSuffix` - The custom storage service url suffix.
- `keyVaultSuffix` - The custom Key Vault service url suffix.
- `metricsQueryAudience` - The custom audiences available for metrics query.
- `metricsClientAudience` - The custom audiences available for metrics client.
- `logAnalyticsEndpoint` - The custom log analytics endpoint. _(Required only if Azure Log Analytics resource is configured for scraping)_

### Metric Defaults

Expand All @@ -98,7 +99,7 @@ values are `v1`. *(Required)*
- `metricDefaults.scraping.schedule` - A cron expression that controls
the frequency of which all the configured metrics will be scraped from Azure Monitor.
You can use [crontab-generator.org](https://crontab-generator.org/) to generate
a cron that fits your needs. *(Required)*
a cron that fits your needs. _(Required)_

### Metrics

Expand All @@ -119,7 +120,7 @@ Every metric that is being declared needs to define the following fields:
- `azureMetricConfiguration.limit` - The maximum amount of resources to scrape when using dimensions
or filters.
- `resourceDiscoveryGroups` An array of one or more resource discovery groups that will be used to automatically
discover all resources through Promitor Resource Discovery. For every found resource, it will get the metrics and
discover all resources through Promitor Resource Discovery. For every found resource, it will get the metrics and
report them. Learn more on resource discovery, in [our documentation](https://promitor.io/concepts#using-resource-discovery)

All resources provide the capability to override the default Azure metadata:
Expand All @@ -130,10 +131,10 @@ All resources provide the capability to override the default Azure metadata:
Additionally, the following fields are optional:

- `azureMetricConfiguration.dimensions` - A list of dimensions that should
be used to scrape a multi-dimensional metric in Azure Monitor.
- ☝ *Promitor simply acts as a proxy and will not validate if the given dimensions are supported or
not, we recommend verifying that they are in the
[official documentation](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported)*
be used to scrape a multi-dimensional metric in Azure Monitor.
- ☝ _Promitor simply acts as a proxy and will not validate if the given dimensions are supported or
not, we recommend verifying that they are in the
[official documentation](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported)_
- `labels` - Defines a set of custom labels to include for a given metric.
- `scraping.schedule` - A scraping schedule for the individual metric; overrides
the the one specified in `metricDefaults`
Expand Down Expand Up @@ -199,7 +200,7 @@ metrics:
resourceGroupName: promitor-dev
subscriptionId: ABC
resourceDiscoveryGroups: # Optional, requires Promitor Resource Discovery agent (https://promitor.io/concepts/how-it-works#using-resource-discovery)
- name: service-bus-landscape
- name: service-bus-landscape
```

[← back](../index.md)
41 changes: 41 additions & 0 deletions docs/scraping/providers/dns-zone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
tags:
- Scraper
- Resource Discovery
- Networking
- DNS
---

# Azure DNS Zone

![Availability Badge](https://img.shields.io/badge/Available%20Starting-v2.5-green.svg)![Resource Discovery Support Badge](https://img.shields.io/badge/Support%20for%20Resource%20Discovery-Yes-green.svg)

You can declare to scrape an Azure DNS Zone via the `DnsZone` resource type.

When using declared resources, the following fields need to be provided:

- `zoneName` - The name of the DNS zone

All supported metrics are documented in the official [Azure Monitor documentation](https://learn.microsoft.com/en-us/azure/azure-monitor/reference/supported-metrics/microsoft-network-dnszones-metrics).

## Example

Here is an example configuration:

```yaml
name: azure_dns_zone_capacity_utilization
description: "Percentage of record set capacity utilized by a DNS zone"
resourceType: DnsZone
scraping:
schedule: "0 */2 * ? * *"
azureMetricConfiguration:
metricName: RecordSetCapacityUtilization
aggregation:
type: Maximum
interval: 00:01:00
resources: # Optional, required when no resource discovery is configured
- zoneName: promitor.io
- zoneName: api.promitor.io
resourceDiscoveryGroups: # Optional, requires Promitor Resource Discovery agent (https://docs.promitor.io/latest/how-it-works#using-resource-discovery)
- name: dns-zone-landscape
```
13 changes: 6 additions & 7 deletions docs/thank-you.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,13 @@ Here is an overview of the services that are so kind to support us:
We are using the following GitHub Apps:

- [Semantic Pull Requests](https://github.com/apps/semantic-pull-requests) - Ensure PRs are using a
consistent approach.
consistent approach.
- [Task list completed](https://github.com/marketplace/task-list-completed) -
Ensures all task lists in our PRs are completed.
- [Triage New Issues](https://github.com/apps/triage-new-issues) - Automatically
tag new issues & PRs with `triage` label.
- **Triage New Issues** - Automatically tag new issues & PRs with `triage` label. _(No longer available)_
- [Request Info](https://github.com/apps/request-info) - Requests more info from
newly opened Pull Requests and Issues.
- [YAMBURGER](https://github.com/apps/yamburger) - Finds YAML syntax errors.
- **YAMBURGER** - Finds YAML syntax errors. _(Archived as of August 2025)_
- [Reminders](https://github.com/apps/reminders) - Set reminders on Issues and
Pull Requests.
- [Check TODO](https://github.com/marketplace/check-todo) - Check TODO allows you
Expand All @@ -85,9 +84,9 @@ Here is an overview of the NuGet packages that we rely on:
- [Prometheus.Client](https://github.com/PrometheusClientNet/Prometheus.Client)
- .NET client for prometheus.io
- [spectre.console](https://github.com/spectresystems/spectre.console) - A library that makes it easier to create
beautiful console applications.
beautiful console applications.
- [Humanizer](https://github.com/Humanizr/Humanizer) - Humanizer meets all your .NET needs for manipulating and
displaying strings, enums, dates, times, timespans, numbers and quantities
displaying strings, enums, dates, times, timespans, numbers and quantities
- [YamlDotNet](https://github.com/aaubry/YamlDotNet) - .NET library for YAML
- [Guard.NET](https://github.com/george-pancescu/Guard) - Library that facilitates
runtime checks of code and allows to define preconditions and invariants within
Expand All @@ -98,4 +97,4 @@ Here is an overview of the NuGet packages that we rely on:
- [Bogus](https://github.com/bchavez/Bogus) - A simple and sane data generator for
populating objects
- [xUnit](https://github.com/xunit/xunit) - Free, open source, community-focused
unit testing tool for the .NET
unit testing tool for the .NET
Loading