-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: K8s containers for cAdvisor & kubeletstats telemetry (#1526)
* feat: K8s containers for cAdvisor & kubeletstats telemetry * test: Sample telemetry for k8s containers via ksm, kubeletstats, cadvisor --------- Co-authored-by: Javi Imbernón <[email protected]>
- Loading branch information
1 parent
c83c4c6
commit 3aadc5c
Showing
4 changed files
with
163 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
entity-types/infra-container/tests/k8s-cadvisor-via-opentelemetry-prometheus-receiver.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[ | ||
{ | ||
"k8s.cluster.name": "farm", | ||
"namespace": "orchards", | ||
"pod": "tree-afge", | ||
"container": "peach-332", | ||
"newrelic.source": "api.metrics.otlp", | ||
"newrelicOnly": "true", | ||
"metricName": "container_start_time_seconds", | ||
"container_cpu_usage_seconds_total": {"type":"gauge","count":1,"sum":1.70794305E9,"min":1.70794305E9,"max":1.70794305E9,"latest":1.70794305E9} | ||
}, | ||
{ | ||
"k8s.cluster.name": "universe", | ||
"namespace": "solar-system", | ||
"pod": "earth", | ||
"container": "verdant-forest", | ||
"newrelic.source": "api.metrics.otlp", | ||
"newrelicOnly": "true", | ||
"metricName": "container_cpu_usage_seconds_total", | ||
"container_cpu_usage_seconds_total": {"type":"cumulativeCount","count":0.0,"cumulative":1123.000001}, | ||
"description": "Cumulative cpu time consumed in seconds", | ||
"otel.library.name": "otelcol/prometheusreceiver", | ||
"otel.library.version": "0.91.0", | ||
"instrumentation.provider": "opentelemetry", | ||
"cpu": "total", | ||
"end_timestamp": 1710174211131, | ||
"http.scheme": "https", | ||
"id": "/system.slice/kubelet.service", | ||
"image": "gke.gcr.io/foo@sha256:111122223333aaaabbbbbcccccddddd", | ||
"k8s.node.name": "verdant-forests-123", | ||
"net.host.name": "verdant-forests-123", | ||
"service.instance.id": "verdant-forests-123", | ||
"name": "5bcc88d422b8b50b" | ||
} | ||
] |
34 changes: 34 additions & 0 deletions
34
entity-types/infra-container/tests/k8s-ksm-via-opentelemetry-prometheus-receiver.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[ | ||
{ | ||
"k8s.cluster.name": "farm", | ||
"namespace": "orchards", | ||
"pod": "tree-afge", | ||
"container": "peach-332", | ||
"newrelic.source": "api.metrics.otlp", | ||
"newrelicOnly": "true", | ||
"metricName": "kube_pod_container_status_ready", | ||
"kube_pod_container_status_ready": {"type":"gauge","count":1,"sum":1.0,"min":1.0,"max":1.0,"latest":1.0} | ||
}, | ||
{ | ||
"k8s.cluster.name": "universe", | ||
"namespace": "solar-system", | ||
"pod": "earth", | ||
"container": "verdant-forest", | ||
"newrelic.source": "api.metrics.otlp", | ||
"newrelicOnly": "true", | ||
"metricName": "kube_pod_container_info", | ||
"kube_pod_container_info": {"type":"gauge","count":1,"sum":1.0,"min":1.0,"max":1.0,"latest":1.0}, | ||
"description": "[STABLE] Information about a container in a pod.", | ||
"otel.library.name": "otelcol/prometheusreceiver", | ||
"otel.library.version": "0.91.0", | ||
"instrumentation.provider": "opentelemetry", | ||
"image":"sha256:1f337e7e6242ffe8cb590da7fa41ed409b8f759bcb075767b74d3861c9d25cc0", | ||
"image_id":"gke.gcr.io/foo@sha256:3aaf29f6967aafd47e50007eedc9c2ac78a202a213f43af92e0b9ccfebc63636", | ||
"image_spec":"gke.gcr.io/foo@sha256:3aaf29f6967aafd47e50007eedc9c2ac78a202a213f43af92e0b9ccfebc63636", | ||
"net.host.port": "8080", | ||
"net.host.name": "11.11.1.11", | ||
"service.instance.id": "11.11.1.11:8080", | ||
"http.scheme": "http", | ||
"container_id": "containerd://b413084f553d6c30d4f96e7ceeef60d858ec9dbce93d93d945afd15398fb5f0d" | ||
} | ||
] |
30 changes: 30 additions & 0 deletions
30
entity-types/infra-container/tests/k8s-kubeletstats-opentelemetry.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[ | ||
{ | ||
"k8s.cluster.name": "farm", | ||
"k8s.namespace.name": "orchards", | ||
"k8s.pod.name": "tree-afge", | ||
"k8s.container.name": "peach-332", | ||
"newrelic.source": "api.metrics.otlp", | ||
"newrelicOnly": "true", | ||
"metricName": "container.cpu.utilization", | ||
"container.cpu.utilization": {"type":"gauge","count":1,"sum":9.04E-6,"min":9.04E-6,"max":9.04E-6,"latest":9.04E-6} | ||
}, | ||
{ | ||
"k8s.cluster.name": "universe", | ||
"k8s.namespace.name": "solar-system", | ||
"k8s.pod.name": "earth", | ||
"k8s.container.name": "verdant-forest", | ||
"newrelic.source": "api.metrics.otlp", | ||
"newrelicOnly": "true", | ||
"metricName": "container.memory.usage", | ||
"container.memory.usage": {"type":"gauge","count":1,"sum":3.0121984E7,"min":3.0121984E7,"max":3.0121984E7,"latest":3.0121984E7}, | ||
"k8s.pod.uid": "1a91119-1d15-416c-1bb1-11a1821f381b", | ||
"k8s.pod.start_time": "2023-02-05T05:23:54Z", | ||
"k8s.node.name": "verdant-forests-123", | ||
"description": "Container memory usage", | ||
"otel.library.name": "otelcol/kubeletstatsreceiver", | ||
"otel.library.version": "0.91.0", | ||
"instrumentation.provider": "opentelemetry", | ||
"unit": "By" | ||
} | ||
] |