You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you need to configure the component yourself, make sure to mount the `hostfs`
756
+
volume if you want to collect the node's metrics and not the container's.
757
+
758
+
```yaml
759
+
---
760
+
apiVersion: apps/v1
761
+
kind: DaemonSet
762
+
...
763
+
spec:
764
+
...
765
+
template:
766
+
...
767
+
spec:
768
+
...
769
+
containers:
770
+
- name: opentelemetry-collector
771
+
...
772
+
volumeMounts:
773
+
...
774
+
- name: hostfs
775
+
mountPath: /hostfs
776
+
readOnly: true
777
+
mountPropagation: HostToContainer
778
+
volumes:
779
+
...
780
+
- name: hostfs
781
+
hostPath:
782
+
path: /
783
+
...
784
+
```
785
+
786
+
and then configure the Host Metrics Receiver to use the `volumeMount`:
787
+
788
+
```yaml
789
+
receivers:
790
+
hostmetrics:
791
+
root_path: /hostfs
792
+
collection_interval: 10s
793
+
scrapers:
794
+
cpu:
795
+
load:
796
+
memory:
797
+
disk:
798
+
filesystem:
799
+
network:
800
+
```
801
+
802
+
For more details about using the receiver in a container, see
803
+
[Collecting host metrics from inside a container (Linux only)](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver#collecting-host-metrics-from-inside-a-container-linux-only)
0 commit comments