Hi everyone,
I’m using Grafana Alloy to collect system metrics from an Ubuntu host, with Prometheus as the backend. I followed the official tutorial here: Monitor Linux servers with Grafana Alloy | Grafana Alloy documentation, making a few adjustments for my environment.
Both Grafana Alloy and Prometheus are running in Docker containers. I can see metrics like:
-
node_network_transmit_bytes_total{device="eth0"} -
node_network_transmit_bytes_total{device="lo"}
However, I’m not seeing metrics for node_network_transmit_bytes_total{device="wlan1"}.
Here’s a snippet of my setup:
Docker Compose:
grafana-alloy:
image: grafana/alloy:latest
ports:
- "12345:12345"
- "3101:3101"
volumes:
- ./config.alloy:/etc/alloy/config.alloy
- alloy_data:/var/lib/alloy/data
- /:/rootfs:ro
- /sys:/sys:ro
command: run --server.http.listen-addr=0.0.0.0:12345 --storage.path=/var/lib/alloy/data /etc/alloy/config.alloy
prometheus:
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
Alloy Config (config.alloy):
prometheus.exporter.unix "metrics" {
disable_collectors = ["ipvs", "btrfs", "infiniband", "xfs", "zfs"]
enable_collectors = ["meminfo"]
netclass {
ignored_devices = "^(veth.*|cali.*|[a-f0-9]{15})$"
}
netdev {
device_exclude = "^(veth.*|cali.*|[a-f0-9]{15})$"
}
}
Prometheus Config (prometheus.yml):
scrape_configs:
- job_name: 'alloy'
static_configs:
- targets: ['grafana-alloy:12345']
Is there something I’m missing that would prevent wlan1 from being included in the metrics? Any advice or pointers would be greatly appreciated!
Thanks in advance!