Hi all,
I’m trying to set up prometheus.exporter.cadvisor to monitor all containers. However, I only get metrics for the alloy container itself.
I’m running alloy inside docker container, mounted /var/run/docker.sock inside container
config file:
prometheus.exporter.cadvisor "example" {
docker_host = "unix:///var/run/docker.sock"
storage_duration = "5m"
}
// Configure a prometheus.scrape component to collect cadvisor metrics.
prometheus.scrape "scraper" {
targets = prometheus.exporter.cadvisor.example.targets
forward_to = [ prometheus.remote_write.demo.receiver ]
}
prometheus.remote_write "demo" {
endpoint {
url = PROMETHEUS_REMOTE_WRITE_URL
basic_auth {
username = USERNAME
password = PASSWORD
}
}
}