From b133a4ee052b97fd4859974a8108b203b84328d8 Mon Sep 17 00:00:00 2001 From: digitalstudium <40897694+digitalstudium@users.noreply.github.com> Date: Sun, 25 Jul 2021 10:29:36 +0300 Subject: [PATCH] Create README.md --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..0e626cb --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# grafana-docker-stack + +For deploying Grafana, Prometheus and Node Exporter, make these steps: +1. Deploy stack +``` +git clone https://github.com/digitalstudium/grafana-docker-stack.git +docker stack deploy -c grafana-docker-stack/docker-compose.yml monitoring +``` +2. Add prometheus datasource with address `http://prometheus:9090` to grafana +3. Add these three lines to the bottom of `/var/lib/docker/volumes/monitoring_prom-configs/_data/prometheus.yml` file, to `scrape_configs:` section: +``` + - job_name: 'node-exporter' + + static_configs: + - targets: ['node-exporter:9100'] +``` +4. Reload prometheus config via this command: +``` +docker ps | grep prometheus | awk '{print $1}' | xargs docker kill -s SIGHUP +``` +5. Import this dashboard: https://grafana.com/grafana/dashboards/1860 to grafana. + +That's it!