cadvisor (0/1 up) and node-exporter (0/1 up) are showing in Prometheus URL
But Services and Container are both running in Server
Here is the docker-compose.yml file
version: '3.2'
services:
prometheus:
image: prom/prometheus:latest
# container_name: monitoring_prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
volumes:
- /Prometheus/alert.rules:/etc/prometheus/alert.rules
- /Prometheus/container.yml:/etc/prometheus/container.yml
- /Prometheus/diskusage.yml:/etc/prometheus/diskusage.yml
- ./prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- 9090:9090
node-exporter:
image: prom/node-exporter:latest
# container_name: monitoring_node_exporter
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
ports:
- 9091:9091
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--path.rootfs=/host'
- '--collector.filesystem.ignored-mount-points="^(/rootfs|/host|)/(sys|proc|dev|host|etc)($|/)"'
- '--collector.filesystem.ignored-fs-types="^(sys|proc|auto|cgroup|devpts|ns|au|fuse\.lxc|mqueue)(fs|)$"'
cadvisor:
image: google/cadvisor:latest
# container_name: monitoring_cadvisor
ports:
- 9092:9092
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
grafana:
image: grafana/grafana:latest
# image: grafana-custom:latest
# container_name: monitoring_grafana
volumes:
- grafana-data:/var/lib/grafana
# - ./data/grafana:/var/lib/grafana
# - ./grafana/provisioning:/etc/grafana/provisioning
# - ./defaults.ini:/usr/share/grafana/conf/defaults.ini
ports:
- 3000:3000
environment:
- "GF_SMTP_ENABLED=true"
- "GF_SMTP_HOST=smtp.gmail.com:465"
- "GF_SMTP_USER=test@gmail.com"
- "GF_SMTP_PASSWORD=xxxxxx"
alertmanager:
image: prom/alertmanager
# privileged: true
volumes:
- ./alertmanager.yml:/alertmanager.yml
command:
- '--config.file=/alertmanager.yml'
ports:
- '9093:9093'
karma-alert-dashboard:
# image: cloudflare/unsee
image: lmierzwa/karma:latest
environment:
# - "ALERTMANAGER_URIS=default:http://alertmanager:9093"
- "ALERTMANAGER_URI=http://alertmanager:9093"
ports:
- '9094:9094'
volumes:
grafana-data:
and here is the log file of cadvisor
W0616 10:57:55.804771 1 manager.go:349] Could not configure a source for OOM detection, disabling OOM events: open /dev/kmsg: no such file or directory
And for node-exporter is there nothing showing in container