Commit 4a3fd33
[chore] document metrics for allocatable_types_to_report setting (#42539)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Document the metrics produced by the `allocatable_types_to_report`
setting in the k8scluster receiver.
- Add an explicit table mapping allocatable types to metric names in
README.
- Clarify that `storage` is not part of Kubernetes Node Allocatable and
remove it from the listed types.
-
https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable
- Add a reference to Kubernetes Node Allocatable docs for clarity.
<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes #42311
<!--Describe what testing was performed and which tests were added.-->
#### Testing
Deployed `opentelemetry-collector-contrib` v0.133.0 via the official
Helm chart(`mode=deployment`, `presets.clusterMetrics=true`) and enabled
allocatable metrics in the `k8s_cluster` receiver as follows:
```yaml
config:
receivers:
k8s_cluster:
auth_type: serviceAccount
collection_interval: 30s
allocatable_types_to_report:
- cpu
- memory
- ephemeral-storage
- storage
- pods
exporters:
prometheus:
endpoint: "0.0.0.0:8889"
```
With this configuration, the following metrics were observed on
/metrics:
```
# HELP k8s_node_allocatable_cpu Amount of cpu allocatable on the node
# TYPE k8s_node_allocatable_cpu gauge
k8s_node_allocatable_cpu{otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver",otel_scope_schema_url="",otel_scope_version="0.133.0"} 1.93
# HELP k8s_node_allocatable_ephemeral_storage_bytes Amount of ephemeral-storage allocatable on the node
# TYPE k8s_node_allocatable_ephemeral_storage_bytes gauge
k8s_node_allocatable_ephemeral_storage_bytes{otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver",otel_scope_schema_url="",otel_scope_version="0.133.0"} 7.6224326324e+10
# HELP k8s_node_allocatable_memory_bytes Amount of memory allocatable on the node
# TYPE k8s_node_allocatable_memory_bytes gauge
k8s_node_allocatable_memory_bytes{otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver",otel_scope_schema_url="",otel_scope_version="0.133.0"} 5.54446848e+08
# HELP k8s_node_allocatable_pods Amount of pods allocatable on the node
# TYPE k8s_node_allocatable_pods gauge
k8s_node_allocatable_pods{otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver",otel_scope_schema_url="",otel_scope_version="0.133.0"} 4
```
<!--Describe the documentation added.-->
#### Documentation
<!--Please delete paragraphs that you did not use before submitting.-->
Signed-off-by: jaehanbyun <[email protected]>
Co-authored-by: Christos Markou <[email protected]>1 parent 7b83ee5 commit 4a3fd33
2 files changed
+12
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
63 | 72 | | |
64 | 73 | | |
65 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
0 commit comments