Skip to content

Commit eea7dc4

Browse files
authored
feat(docs): add DNS Zone support (#72)
1 parent d606a0e commit eea7dc4

File tree

5 files changed

+326
-283
lines changed

5 files changed

+326
-283
lines changed
Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# Declaring resource discovery groups
22

33
Promitor Resource Discovery allows you to declare the Azure landscape to explore and define resource discovery groups
4-
in YAML.
4+
in YAML.
55

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

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

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

1818
Here is an example of a full declaration using a custom cloud:
@@ -22,9 +22,9 @@ version: v1
2222
azureLandscape:
2323
tenantId: e0372f7f-a362-47fb-9631-74a5c4ba8bbf
2424
subscriptions:
25-
- SUBSCRIPTON-ID-ABC
26-
- SUBSCRIPTON-ID-DEF
27-
- SUBSCRIPTON-ID-GHI
25+
- SUBSCRIPTON-ID-ABC
26+
- SUBSCRIPTON-ID-DEF
27+
- SUBSCRIPTON-ID-GHI
2828
cloud: Custom
2929
endpoints:
3030
authenticationEndpoint: https://custom-authentication-endpoint
@@ -34,62 +34,64 @@ azureLandscape:
3434
storageEndpointSuffix: custom-storage-endpoint-suffix
3535
keyVaultSuffix: custom-key-vault-suffix
3636
resourceDiscoveryGroups:
37-
- name: container-registry-landscape
38-
type: ContainerRegistry
39-
- name: filtered-logic-apps-landscape
40-
type: LogicApp
41-
criteria:
42-
include:
43-
subscriptions:
44-
- SUBSCRIPTON-ID-ABC
45-
- SUBSCRIPTON-ID-GHI
46-
resourceGroups:
47-
- promitor-resource-group-1
48-
- promitor-resource-group-2
49-
tags:
50-
app: promitor-1|promitor-2
51-
region: europe
52-
regions:
53-
- northeurope
54-
- westeurope
37+
- name: container-registry-landscape
38+
type: ContainerRegistry
39+
- name: dns-zone-landscape
40+
type: DnsZone
41+
- name: filtered-logic-apps-landscape
42+
type: LogicApp
43+
criteria:
44+
include:
45+
subscriptions:
46+
- SUBSCRIPTON-ID-ABC
47+
- SUBSCRIPTON-ID-GHI
48+
resourceGroups:
49+
- promitor-resource-group-1
50+
- promitor-resource-group-2
51+
tags:
52+
app: promitor-1|promitor-2
53+
region: europe
54+
regions:
55+
- northeurope
56+
- westeurope
5557
```
5658
5759
## Specification
5860
5961
As Promitor evolves we need to change the structure of our resource discovery declaration.
6062
6163
`version: {version}` - Version of declaration that is used. Allowed
62-
values are `v1`. *(Required)*
64+
values are `v1`. _(Required)_
6365

6466
### Azure Landscape
6567

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

7880
### Resource Discovery Groups
7981

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

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

8688
#### Criteria
8789

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

9193
- `subscriptions` - A list of subscription(s) in which the resource is allowed to be located.
9294
- `resourceGroups` - A list of resource group(s) in which the resource is allowed to be located.
9395
- `tags` - A list of [Azure tags](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/tag-resources)
94-
and the expected values (exact or regular expression) with which the resources have to be annotated. (Uses `or`)
96+
and the expected values (exact or regular expression) with which the resources have to be annotated. (Uses `or`)
9597
- `regions` - A list of Azure region(s) in which the resource is allowed to be located.

docs/scraping/overview.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ file which is referred to as the metric declaration.
66
This declaration defines the overall Azure metadata and all the metrics you want to expose.
77

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

1111
## Supported Azure Services
1212

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

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

7273
### Azure
7374

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

9091
### Metric Defaults
9192

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

103104
### Metrics
104105

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

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

132133
- `azureMetricConfiguration.dimensions` - A list of dimensions that should
133-
be used to scrape a multi-dimensional metric in Azure Monitor.
134-
-*Promitor simply acts as a proxy and will not validate if the given dimensions are supported or
135-
not, we recommend verifying that they are in the
136-
[official documentation](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported)*
134+
be used to scrape a multi-dimensional metric in Azure Monitor.
135+
-_Promitor simply acts as a proxy and will not validate if the given dimensions are supported or
136+
not, we recommend verifying that they are in the
137+
[official documentation](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported)_
137138
- `labels` - Defines a set of custom labels to include for a given metric.
138139
- `scraping.schedule` - A scraping schedule for the individual metric; overrides
139140
the the one specified in `metricDefaults`
@@ -199,7 +200,7 @@ metrics:
199200
resourceGroupName: promitor-dev
200201
subscriptionId: ABC
201202
resourceDiscoveryGroups: # Optional, requires Promitor Resource Discovery agent (https://promitor.io/concepts/how-it-works#using-resource-discovery)
202-
- name: service-bus-landscape
203+
- name: service-bus-landscape
203204
```
204205
205206
[← back](../index.md)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
tags:
3+
- Scraper
4+
- Resource Discovery
5+
- Networking
6+
- DNS
7+
---
8+
9+
# Azure DNS Zone
10+
11+
![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)
12+
13+
You can declare to scrape an Azure DNS Zone via the `DnsZone` resource type.
14+
15+
When using declared resources, the following fields need to be provided:
16+
17+
- `zoneName` - The name of the DNS zone
18+
19+
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).
20+
21+
## Example
22+
23+
Here is an example configuration:
24+
25+
```yaml
26+
name: azure_dns_zone_capacity_utilization
27+
description: "Percentage of record set capacity utilized by a DNS zone"
28+
resourceType: DnsZone
29+
scraping:
30+
schedule: "0 */2 * ? * *"
31+
azureMetricConfiguration:
32+
metricName: RecordSetCapacityUtilization
33+
aggregation:
34+
type: Maximum
35+
interval: 00:01:00
36+
resources: # Optional, required when no resource discovery is configured
37+
- zoneName: promitor.io
38+
- zoneName: api.promitor.io
39+
resourceDiscoveryGroups: # Optional, requires Promitor Resource Discovery agent (https://docs.promitor.io/latest/how-it-works#using-resource-discovery)
40+
- name: dns-zone-landscape
41+
```

docs/thank-you.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,13 @@ Here is an overview of the services that are so kind to support us:
5454
We are using the following GitHub Apps:
5555

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

0 commit comments

Comments
 (0)