From 5fd0c3418907d69cab73e30483abd96a3b1b2ecd Mon Sep 17 00:00:00 2001 From: setop Date: Fri, 13 Oct 2023 12:31:46 +0200 Subject: [PATCH] update versions --- README.md | 4 +--- docker-compose.yml | 20 ++++++++++++++------ prometheus/prometheus.yml | 8 ++++---- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index e84b9af..81017cb 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,7 @@ Prometheus-Grafana A monitoring solution for Docker hosts and containers with [Prometheus](https://prometheus.io/), [Grafana](http://grafana.org/), [cAdvisor](https://github.com/google/cadvisor), [NodeExporter](https://github.com/prometheus/node_exporter) and alerting with [AlertManager](https://github.com/prometheus/alertmanager). -This is a forked repository. So, you may want to visit the original repo at [stefanprodan -/ -dockprom](https://github.com/stefanprodan/dockprom) +This is a forked repository. So, you may want to visit the original repo at [stefanprodan/dockprom](https://github.com/stefanprodan/dockprom) Additional info: [Docker - Prometheus and Grafana](https://bogotobogo.com/DevOps/Docker/Docker_Prometheus_Grafana.php) diff --git a/docker-compose.yml b/docker-compose.yml index 779cd08..974cd9b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ volumes: services: prometheus: - image: prom/prometheus:v2.17.1 + image: prom/prometheus:v2.24.1 container_name: prometheus volumes: - ./prometheus:/etc/prometheus @@ -32,7 +32,7 @@ services: org.label-schema.group: "monitoring" alertmanager: - image: prom/alertmanager:v0.20.0 + image: prom/alertmanager:v0.21.0 container_name: alertmanager volumes: - ./alertmanager:/etc/alertmanager @@ -48,7 +48,7 @@ services: org.label-schema.group: "monitoring" nodeexporter: - image: prom/node-exporter:v0.18.1 + image: prom/node-exporter:v1.0.1 container_name: nodeexporter volumes: - /proc:/host/proc:ro @@ -68,24 +68,32 @@ services: org.label-schema.group: "monitoring" cadvisor: - image: gcr.io/google-containers/cadvisor:v0.34.0 + image: gcr.io/cadvisor/cadvisor:latest container_name: cadvisor volumes: - /:/rootfs:ro - /var/run:/var/run:rw - /sys:/sys:ro - /var/lib/docker:/var/lib/docker:ro - #- /cgroup:/cgroup:ro #doesn't work on MacOS only for Linux + - /sys/fs/cgroup:/cgroup:ro + - /dev/disk/:/dev/disk:ro restart: unless-stopped + devices: + - /dev/kmsg:/dev/kmsg + security_opt: + - no-new-privileges:true expose: - 8080 networks: - monitor-net labels: org.label-schema.group: "monitoring" + command: + - '-housekeeping_interval=10s' + - '-docker_only=true' grafana: - image: grafana/grafana:6.7.2 + image: grafana/grafana:7.3.7 container_name: grafana volumes: - grafana_data:/var/lib/grafana diff --git a/prometheus/prometheus.yml b/prometheus/prometheus.yml index 7906963..4dc560f 100644 --- a/prometheus/prometheus.yml +++ b/prometheus/prometheus.yml @@ -14,22 +14,22 @@ rule_files: # A scrape configuration containing exactly one endpoint to scrape. scrape_configs: - job_name: 'nodeexporter' - scrape_interval: 5s + scrape_interval: 15s static_configs: - targets: ['nodeexporter:9100'] - job_name: 'cadvisor' - scrape_interval: 5s + scrape_interval: 15s static_configs: - targets: ['cadvisor:8080'] - job_name: 'prometheus' - scrape_interval: 10s + scrape_interval: 15s static_configs: - targets: ['localhost:9090'] - job_name: 'pushgateway' - scrape_interval: 10s + scrape_interval: 15s honor_labels: true static_configs: - targets: ['pushgateway:9091']