Skip to content

Commit 114e68f

Browse files
bitomaxspiadjivon
andauthored
[CONTINT-4835]: Improve documentation wrt CR metric collection (#32753)
* [CONTINT-4835]: Improve documentation wrt CR metric collection Clarify how RBAC is setup. Clarify how metric names are produced. * Fix after review * Update content/en/infrastructure/containers/configuration.md Co-authored-by: Ida Adjivon <65119712+iadjivon@users.noreply.github.com> * Update content/en/infrastructure/containers/configuration.md Co-authored-by: Ida Adjivon <65119712+iadjivon@users.noreply.github.com> * Update content/en/infrastructure/containers/configuration.md --------- Co-authored-by: Ida Adjivon <65119712+iadjivon@users.noreply.github.com>
1 parent a39d4f4 commit 114e68f

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

content/en/infrastructure/containers/configuration.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ You can use the `kubernetes_state_core` check to collect custom resource metrics
430430
crd_type: "eniconfig"
431431
labelsFromPath:
432432
crd_name: [metadata, name]
433+
metricNamePrefix: "userPrefix"
433434
metrics:
434435
- name: "eniconfig"
435436
help: "ENI Config"
@@ -455,8 +456,16 @@ You can use the `kubernetes_state_core` check to collect custom resource metrics
455456
path: [metadata, generation]
456457
```
457458

459+
By default, RBAC and API resource names are derived from the kind in groupVersionKind by converting it to lowercase, and adding an "s" suffix (for example, Kind: ENIConfig → eniconfigs). If the Custom Resource Definition (CRD) uses a different plural form, you can override this behavior by specifying the resource field. In the example above, CNINode overrides the default by setting resource: "cninode-pluralized".
460+
461+
Metric names are produced using the following rules:
462+
463+
a. No prefix precified: `kubernetes_state_customresource.<metrics.name>`
464+
465+
b. Prefix precified: `kubernetes_state_customresource.<metricNamePrefix>_<metric.name>`
466+
458467
For more details, see [Custom Resource State Metrics][5].
459-
468+
460469
2. Update your Helm or Datadog Operator configuration:
461470

462471
{{< tabs >}}
@@ -483,6 +492,10 @@ You can use the `kubernetes_state_core` check to collect custom resource metrics
483492
{{% /tab %}}
484493
{{% tab "Datadog Operator" %}}
485494

495+
<div class="alert alert-info">
496+
This functionality requires Agent Operator v1.20+.
497+
</div>
498+
486499
1. Install the Datadog Operator with an option that grants the Datadog Agent permission to collect custom resources:
487500

488501
```
@@ -514,7 +527,7 @@ You can use the `kubernetes_state_core` check to collect custom resource metrics
514527

515528
{{% /tab %}}
516529
{{< /tabs >}}
517-
530+
518531
## Further reading
519532

520533
{{< partial name="whats-next/whats-next.html" >}}

0 commit comments

Comments
 (0)