Skip to content

Commit b9c65a3

Browse files
Ingest New Documentation (#2825)
Co-authored-by: netdatabot <43409846+netdatabot@users.noreply.github.com>
1 parent d4e4fa4 commit b9c65a3

46 files changed

Lines changed: 4845 additions & 580 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/Collecting Metrics/Collectors/Cloud and DevOps/Azure API Management.mdx

Lines changed: 120 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The collector has two discovery phases:
6767
**Bootstrap (first run)**
6868

6969
- 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.
7171
- 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.
7272
- A single job can monitor multiple subscriptions.
7373

@@ -169,7 +169,7 @@ The following options can be defined globally: `update_every`, `autodetection_re
169169
| Stock profiles | `/usr/lib/netdata/conf.d/go.d/azure_monitor.profiles/default/` |
170170
| User overrides | `/etc/netdata/go.d/azure_monitor.profiles/` |
171171

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.
173173
Custom profiles extend the collector's catalog -- they do not replace the discovery mechanism.
174174

175175

@@ -198,8 +198,9 @@ Custom profiles extend the collector's catalog -- they do not replace the discov
198198
| | discovery.mode_filters.tags | Optional exact-match tag filters for `filters` mode. Keys are matched case-insensitively and values case-sensitively. | \{} | no |
199199
| | [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 |
200200
| **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 |
203204
| **Limits** | limits.max_concurrency | Maximum concurrent batch queries to Azure Monitor. | 4 | no |
204205
| | limits.max_batch_resources | Maximum resources per Azure Monitor batch request. | 50 | no |
205206
| | 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.
245246
##### discovery.mode_query.kql
246247

247248
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.
248250

249251
The query **must** project these five columns:
250252

@@ -256,6 +258,14 @@ The query **must** project these five columns:
256258
| `resourceGroup` | Resource group name |
257259
| `location` | Azure region |
258260

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+
259269
Example:
260270

261271
```
@@ -272,11 +282,67 @@ Controls how the collector decides which metric profiles to activate.
272282

273283
| Mode | Behavior |
274284
|:-----|:---------|
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.
298+
299+
300+
<a id="option-profiles-profiles-mode-auto-entries"></a>
301+
##### profiles.mode_auto.entries
302+
303+
Each entry has:
304+
305+
| Field | Description |
306+
|:------|:------------|
307+
| `name` | Canonical profile basename. |
308+
| `filters.resource_groups` | Optional resource-group narrowing for this profile. |
309+
| `filters.regions` | Optional region narrowing for this profile. |
310+
| `filters.tags` | Optional tag narrowing for this profile in `discovery.mode: filters`. |
278311

279-
Profile basename matching is case-insensitive. A basename is the profile filename without the `.yaml` / `.yml` suffix.
312+
Auto-mode entries do not activate profiles on their own. They only override filtering for profiles that were auto-selected at bootstrap.
313+
In `discovery.mode: query`, only `filters.resource_groups` and `filters.regions` apply.
314+
315+
316+
<a id="option-profiles-profiles-mode-exact-entries"></a>
317+
##### profiles.mode_exact.entries
318+
319+
Each entry has:
320+
321+
| Field | Description |
322+
|:------|:------------|
323+
| `name` | Canonical profile basename. |
324+
| `filters.resource_groups` | Optional resource-group narrowing for this profile. |
325+
| `filters.regions` | Optional region narrowing for this profile. |
326+
| `filters.tags` | Optional tag narrowing for this profile in `discovery.mode: filters`. |
327+
328+
Per-profile filters only narrow the globally discovered resource set. They never widen it.
329+
In `discovery.mode: query`, only `filters.resource_groups` and `filters.regions` apply.
330+
331+
332+
<a id="option-profiles-profiles-mode-combined-entries"></a>
333+
##### profiles.mode_combined.entries
334+
335+
Each entry has:
336+
337+
| Field | Description |
338+
|:------|:------------|
339+
| `name` | Canonical profile basename. |
340+
| `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.
280346

281347

282348

@@ -365,9 +431,49 @@ jobs:
365431
profiles:
366432
mode: exact
367433
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.
371477
auth:
372478
mode: managed_identity
373479
@@ -466,7 +572,7 @@ Labels:
466572
| resource_group | The Azure resource group. |
467573
| region | The Azure region where the resource is deployed. |
468574
| resource_type | The Azure resource type identifier. |
469-
| profile | The Azure Monitor profile id. |
575+
| profile | The Azure Monitor profile basename. |
470576
| subscription_id | The Azure subscription identifier. |
471577
| resource_uid | The unique Azure resource identifier. |
472578

@@ -574,8 +680,8 @@ Check the following:
574680

575681
Profiles are matched by Azure resource type. If a resource type exists but metrics are missing:
576682

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:
579685
```bash
580686
ls /usr/lib/netdata/conf.d/go.d/azure_monitor.profiles/default/
581687
```

0 commit comments

Comments
 (0)