agent
agent copied to clipboard
node exporter integration can't access /proc/sys/net
What's wrong?
node exporter rely on /proc to be able to retrieve information needed by network related metrics.
I would like to track node-exporter's node_nf_conntrack_entries
metric, which depends on /proc/sys/net/netfilter/nf_conntrack_count
file.
node-exporter pods deployed through grafana-agent integration cannot be set, hence default hostNetwork: false
is being used, which prevents the exporter to actually gather the metrics from the host.
Setting hostNetwork: true
solves the issue.
Steps to reproduce
-
Deploy node-exporter as described here: https://grafana.com/docs/agent/latest/operator/operator-integrations/#set-up-an-agent-operator-node_exporter-integration
-
ssh into the node and check content of
/proc/sys/net/netfilter/nf_conntrack_count
-
exec into node-exporter pod and check content of
/proc/sys/net/netfilter/nf_conntrack_count
(0
expected) -
get node-exporter pod definition (kubectl get -o yaml pod-id), modify it and set
hostNetwork: true
, exec into new pod and check content of/proc/sys/net/netfilter/nf_conntrack_count
(same value as host is expected)
System information
kubernetes 1.25
Software version
v0.37.1
Configuration
node_exporter_configs:
- autoscrape:
enable: true
metrics_instance: default/grafana-agent-primary
procfs_path: /host/proc
rootfs_path: /host/rootfs
sysfs_path: /host/sys
### Logs
_No response_