@@ -9,16 +9,28 @@ cAdvisor
99The Splunk Distribution of OpenTelemetry Collector uses the Smart Agent receiver with the
1010cAdvisor monitor type to pull metrics directly from cAdvisor. By
1111default, it runs on port 4193, but it can be configured to any other
12- port.
12+ port.
13+
14+ This integration is available on Kubernetes, Linux, and Windows.
15+
16+ cAdvisor with Kubernetes
17+ ------------------------
1318
1419If you are using Kubernetes, consider the
1520:ref: `kubelet-stats-receiver ` because many Kubernetes nodes do not
1621expose cAdvisor on a network port, even though they are running it
1722within Kubelet.
1823
19- .. note :: The Splunk Distribution of OpenTelemetry Collector has limitations in managed environments such as Amazon EKS.
20- For example, the collector cannot collect specific cgroup metrics exposed by cAdvisor, such as ``container_cpu_cfs_*``.
21- The ``kubeletstats`` receiver also does not expose these metrics by default.
24+ If you are using Kubernetes, consider the Kubelet stats receiver
25+ because many Kubernetes nodes do not expose cAdvisor on a network port,
26+ even though they are running it within Kubelet. Because the Splunk Distribution
27+ of OpenTelemetry Collector has limitations in managed environments such as Amazon EKS,
28+ you can use a :ref: `Prometheus receiver <prometheus_receiver >` to collect specific
29+ cgroup metrics exposed by cAdvisor, such as ``container_cpu_cfs_* ``.
30+ The kubeletstats receiver also does not expose these metrics by default.
31+
32+ cAdvisor with Docker
33+ ---------------------
2234
2335If you are running containers with Docker, retrieved metrics might
2436overlap with ``docker-container-stats ``. Consider not enabling the
@@ -27,13 +39,10 @@ allow only certain metrics. This will cause the built-in Docker
2739dashboards to be blank, but container metrics will be available on the
2840Kubernetes dashboards instead.
2941
30- This integration is available on Kubernetes, Linux, and Windows.
3142
3243Benefits
3344--------
3445
35-
36-
3746.. raw :: html
3847
3948 <div class =" include-start" id =" benefits.rst" ></div >
@@ -45,13 +54,9 @@ Benefits
4554 <div class =" include-stop" id =" benefits.rst" ></div >
4655
4756
48-
49-
5057Installation
5158------------
5259
53-
54-
5560.. raw :: html
5661
5762 <div class =" include-start" id =" collector-installation-linux.rst" ></div >
@@ -63,13 +68,9 @@ Installation
6368 <div class =" include-stop" id =" collector-installation-linux.rst" ></div >
6469
6570
66-
67-
6871Configuration
6972-------------
7073
71-
72-
7374.. raw :: html
7475
7576 <div class =" include-start" id =" configuration.rst" ></div >
@@ -81,10 +82,11 @@ Configuration
8182 <div class =" include-stop" id =" configuration.rst" ></div >
8283
8384
85+ Examples
86+ ^^^^^^^^
8487
85-
86- Example
87- ~~~~~~~
88+ Activate integration
89+ ####################
8890
8991To activate this integration, add the following to your Collector
9092configuration:
@@ -106,8 +108,55 @@ section of your configuration file:
106108 metrics :
107109 receivers : [smartagent/cadvisor]
108110
111+ .. _prometheus_receiver :
112+
113+ Prometheus receiver
114+ ###################
115+
116+ .. code :: yaml
117+
118+ receivers :
119+ prometheus/cadvisor :
120+ config :
121+ scrape_configs :
122+ - job_name : ' kubernetes-nodes-cadvisor'
123+ scheme : https
124+ bearer_token_file : /var/run/secrets/kubernetes.io/serviceaccount/token
125+ kubernetes_sd_configs :
126+ - role : node
127+ relabel_configs :
128+ - target_label : __address__
129+ replacement : kubernetes.default.svc:443
130+ - source_labels : [__meta_kubernetes_node_name]
131+ regex : (.+)
132+ target_label : __metrics_path__
133+ replacement : /api/v1/nodes/$$1/proxy/metrics/cadvisor
134+ metric_relabel_configs :
135+ - source_labels : [__name__]
136+ regex : ' container_cpu_cfs.*'
137+ action : keep
138+ - source_labels : [pod]
139+ target_label : k8s.pod.name
140+ - source_labels : [namespace]
141+ target_label : k8s.namespace.name
142+ - source_labels : [container]
143+ target_label : k8s.container.name
144+ - action : labeldrop
145+ regex : ' pod|namespace|name|id|container'
146+ service :
147+ pipelines :
148+ metrics/scrapers :
149+ exporters :
150+ - signalfx
151+ processors :
152+ - memory_limiter
153+ - batch
154+ - resource/add_environment
155+ receivers :
156+ - prometheus/cadvisor
157+
109158 Configuration settings
110- ~~~~~~~~~~~~~~~~~~~~~~
159+ ^^^^^^^^^^^^^^^^^^^^^^
111160
112161The following table shows the configuration options for this receiver:
113162
@@ -139,9 +188,7 @@ The following metrics are available for this integration:
139188 <div class =" metrics-yaml" url =" https://raw.githubusercontent.com/signalfx/splunk-otel-collector/main/internal/signalfx-agent/pkg/monitors/cadvisor/metadata.yaml" ></div >
140189
141190Notes
142- ~~~~~
143-
144-
191+ ^^^^^
145192
146193.. raw :: html
147194
@@ -159,8 +206,6 @@ Notes
159206Troubleshooting
160207---------------
161208
162-
163-
164209.. raw :: html
165210
166211 <div class =" include-start" id =" troubleshooting-components.rst" ></div >
0 commit comments