You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -67,7 +67,7 @@ The collector has two discovery phases:
67
67
**Bootstrap (first run)**
68
68
69
69
- With the default `profiles.mode: auto`, the collector queries Azure Resource Graph within the configured `subscription_ids` to find candidate resources.
70
-
- It matches discovered resource types against built-in profiles and automatically enables the relevant ones.
70
+
- It matches discovered resource types against [built-in profiles](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/config/go.d/azure_monitor.profiles/default) and automatically enables the relevant ones.
71
71
- Discovery scope can be narrowed using `discovery.mode: filters` (resource groups, regions, tags) or replaced entirely with `discovery.mode: query` for a custom KQL query.
72
72
- A single job can monitor multiple subscriptions.
73
73
@@ -169,7 +169,7 @@ The following options can be defined globally: `update_every`, `autodetection_re
| User overrides |`/etc/netdata/go.d/azure_monitor.profiles/`|
171
171
172
-
User profile files with the same `id` as a stock profile override it.
172
+
User profile files with the same basename as a [stock profile](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/config/go.d/azure_monitor.profiles/default) override it.
173
173
Custom profiles extend the collector's catalog -- they do not replace the discovery mechanism.
174
174
175
175
@@ -198,8 +198,9 @@ Custom profiles extend the collector's catalog -- they do not replace the discov
198
198
|| discovery.mode_filters.tags | Optional exact-match tag filters for `filters` mode. Keys are matched case-insensitively and values case-sensitively. |\{} | no |
199
199
||[discovery.mode_query.kql](#option-discovery-discovery-mode-query-kql)| Custom Azure Resource Graph KQL for `query` mode. Must project `id`, `name`, `type`, `resourceGroup`, `location`. || no |
200
200
|**Profiles**|[profiles.mode](#option-profiles-profiles-mode)| How profiles are selected: `auto` (discover from resources), `exact` (explicit list), or `combined` (both). | auto | no |
201
-
|| profiles.mode_exact.names | Explicit profile file basenames used by `exact` mode. Matching is case-insensitive. |[]| no |
202
-
|| profiles.mode_combined.names | Explicit profile file basenames merged with auto-discovered profiles in `combined` mode. Matching is case-insensitive. |[]| no |
201
+
||[profiles.mode_auto.entries](#option-profiles-profiles-mode-auto-entries)| Optional per-profile overrides applied only to profiles that auto-activate at bootstrap. |[]| no |
202
+
||[profiles.mode_exact.entries](#option-profiles-profiles-mode-exact-entries)| Explicit profile entries used by `exact` mode. |[]| no |
203
+
||[profiles.mode_combined.entries](#option-profiles-profiles-mode-combined-entries)| Explicit profile entries merged with auto-discovered profiles in `combined` mode. |[]| no |
203
204
|**Limits**| limits.max_concurrency | Maximum concurrent batch queries to Azure Monitor. | 4 | no |
204
205
|| limits.max_batch_resources | Maximum resources per Azure Monitor batch request. | 50 | no |
205
206
|| limits.max_metrics_per_query | Maximum metrics per Azure Monitor batch request. | 20 | no |
@@ -245,6 +246,7 @@ Controls how the collector finds candidate Azure resources.
245
246
##### discovery.mode_query.kql
246
247
247
248
A raw Azure Resource Graph KQL query used when `discovery.mode` is `query`.
249
+
See the [Azure Resource Graph query language documentation](https://learn.microsoft.com/en-us/azure/governance/resource-graph/concepts/query-language) for syntax and supported operators.
248
250
249
251
The query **must** project these five columns:
250
252
@@ -256,6 +258,14 @@ The query **must** project these five columns:
256
258
|`resourceGroup`| Resource group name |
257
259
|`location`| Azure region |
258
260
261
+
:::info
262
+
263
+
- Returned resource `type` values should match the Azure resource types expected by the active profiles.
264
+
- Resources with unsupported or non-matching types are ignored and do not activate profiles.
265
+
- For the stock catalog, see [built-in profiles](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/config/go.d/azure_monitor.profiles/default).
266
+
267
+
:::
268
+
259
269
Example:
260
270
261
271
```
@@ -272,11 +282,67 @@ Controls how the collector decides which metric profiles to activate.
272
282
273
283
| Mode | Behavior |
274
284
|:-----|:---------|
275
-
|`auto`| Discovers resource types in your subscriptions and enables matching built-in profiles automatically. This is the default. |
276
-
|`exact`| Uses only the profile basenames listed under `profiles.mode_exact.names`. No auto-discovery. |
277
-
|`combined`| Merges auto-discovered profiles with the basenames listed under `profiles.mode_combined.names`. |
285
+
|`auto`| Discovers resource types in your subscriptions and enables matching [built-in profiles](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/config/go.d/azure_monitor.profiles/default) automatically. This is the default. |
286
+
|`exact`| Uses only the profile entries listed under `profiles.mode_exact.entries`. No auto-discovery. |
287
+
|`combined`| Merges auto-discovered profiles with the explicit entries listed under `profiles.mode_combined.entries`. |
288
+
289
+
Each profile entry uses `name` as the canonical profile basename. The basename is the profile filename without the `.yaml` / `.yml` suffix and must be lowercase.
290
+
291
+
Filter layering:
292
+
293
+
-`discovery.mode_filters.*` defines the job-wide discovery scope.
294
+
-`profiles.mode_*.entries[].filters.*` narrows resources for one profile only.
295
+
- The effective resource set for a profile is the intersection of both filter sets.
296
+
- Per-profile filters never widen or bypass the global discovery scope.
297
+
- In `discovery.mode: query`, per-profile filters can use only `resource_groups` and `regions`. If you need per-profile tag filtering there, encode it in the KQL.
|`filters.resource_groups`| Optional resource-group narrowing for this profile. |
341
+
|`filters.regions`| Optional region narrowing for this profile. |
342
+
|`filters.tags`| Optional tag narrowing for this profile in `discovery.mode: filters`. |
343
+
344
+
If an explicit `combined` entry matches an auto-selected profile, the collector keeps one runtime profile and overlays the explicit entry filters onto it.
345
+
In `discovery.mode: query`, only `filters.resource_groups` and `filters.regions` apply.
280
346
281
347
282
348
@@ -365,9 +431,49 @@ jobs:
365
431
profiles:
366
432
mode: exact
367
433
mode_exact:
368
-
names:
369
-
- sql_database
370
-
- postgres_flexible
434
+
entries:
435
+
- name: sql_database
436
+
- name: postgres_flexible
437
+
auth:
438
+
mode: managed_identity
439
+
440
+
```
441
+
</details>
442
+
443
+
###### Global and per-profile filters together
444
+
445
+
Apply a global discovery boundary to the whole job, then narrow only the SQL Database profile further with a per-profile tag filter.
446
+
447
+
<details open>
448
+
<summary>Config</summary>
449
+
450
+
```yaml
451
+
jobs:
452
+
- name: prod-databases
453
+
subscription_ids:
454
+
- "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
455
+
discovery:
456
+
mode: filters
457
+
mode_filters:
458
+
resource_groups:
459
+
- production-rg
460
+
regions:
461
+
- eastus
462
+
profiles:
463
+
mode: combined
464
+
mode_combined:
465
+
entries:
466
+
- name: sql_database
467
+
filters:
468
+
tags:
469
+
env:
470
+
- prod
471
+
# Effective scope:
472
+
# 1. Discovery first keeps only resources in production-rg and eastus.
473
+
# 2. Auto-selected profiles use that global scope as-is.
474
+
# 3. The sql_database profile is narrowed further to resources tagged env=prod.
475
+
# 4. The sql_database profile cannot see resources outside production-rg/eastus,
476
+
# because per-profile filters only narrow the globally discovered set.
371
477
auth:
372
478
mode: managed_identity
373
479
@@ -466,7 +572,7 @@ Labels:
466
572
| resource_group | The Azure resource group. |
467
573
| region | The Azure region where the resource is deployed. |
468
574
| resource_type | The Azure resource type identifier. |
469
-
| profile | The Azure Monitor profile id. |
575
+
| profile | The Azure Monitor profile basename. |
470
576
| subscription_id | The Azure subscription identifier. |
471
577
| resource_uid | The unique Azure resource identifier. |
472
578
@@ -574,8 +680,8 @@ Check the following:
574
680
575
681
Profiles are matched by Azure resource type. If a resource type exists but metrics are missing:
576
682
577
-
- **Check profile mode** -- Ensure `profiles.mode: auto` (default), or explicitly list the profile basename under `profiles.mode_exact.names` or `profiles.mode_combined.names`.
578
-
- **Verify a built-in profile exists** -- List available profiles:
683
+
- **Check profile mode** -- Ensure `profiles.mode: auto` (default), or explicitly list the profile basename under `profiles.mode_exact.entries` or `profiles.mode_combined.entries`.
684
+
- **Verify a [built-in profile](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/config/go.d/azure_monitor.profiles/default) exists** -- List available profiles:
579
685
```bash
580
686
ls /usr/lib/netdata/conf.d/go.d/azure_monitor.profiles/default/
0 commit comments