Open yellowpattern opened 7 months ago
Sorry, I lie, I get statistics for "eth0" but not the physical interfaces.
If I add:
...
volumeMounts:
- name: procnet
mountPath: /tmp/net
...
volumes:
- name: procnet
hostPath:
path: /proc/net
type: ''
Then I can see the real devices in /tmp/net/dev but I can't mount that in /proc/net.
The config sets HOST_PROC to be /hostfs/proc BUT /hostfs/proc/net/dev is the same as /proc/net/dev. Problem: /proc can't be ounted under /proc. Fixing this requires something like https://github.com/shirou/gopsutil/issues/1625
I found a way...
spec:
...
template:
...
spec:
...
volumeMounts:
- name: procnet
mountPath: /hostfs/proc/net
...
volumes:
- name: procnet
hostPath:
path: /proc/net
type: ''
After getting telegraf to start providing data as a daemon set, I then tried to get some network information (it isn't included in the default set of metrics) by adding this to the configMap:
But there's nothing. No output anywhere.