From 65b06d8a2b92f4edd4b8f528365520cc92083c1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pompas?= Date: Thu, 9 Feb 2023 11:34:56 +0100 Subject: [PATCH] fix: update README --- README.md | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d1f8809..67c659e 100644 --- a/README.md +++ b/README.md @@ -23,21 +23,26 @@ Before we get started installing the stack, we need to make sure that the follow ## Installation and Configuration -If you would like to change which targets should be monitored, you can edit the [prometheus.yml](prometheus/prometheus.yml) file. -
The targets section contains a list of all the targets that should be monitored by Prometheus. -
The names defined in the `job_name` section are used to identify the targets in Grafana. -
The `static_configs` section contains the IP addresses of the targets that should be monitored. Actually, they are sourced from the service names defined in the [docker-compose.yml](docker-compose.yml) file. -
If you think that the `scrape_interval` value is too aggressive, you can change it to a more suitable value. +To install the stack, follow the steps below: -You must also create `data` directory and change the ownership of the `prometheus` and `grafana` folders for a nice and clean installation. -
To do so, run the following commands: +- Clone this repository to your host machine. +```bash +git clone https://github.com/oijkn/Docker-Raspberry-PI-Monitoring.git +``` + +- Enter to the cloned directory. +```bash +cd Docker-Raspberry-PI-Monitoring +``` + + - Create `data` directory and change the ownership of the `prometheus` and `grafana` folders for a nice and clean installation. ```bash mkdir -p prometheus/data grafana/data && \ sudo chown -R 472:472 grafana/ && \ sudo chown -R 65534:65534 prometheus/ ``` -Once you have made the necessary changes, simply clone this repository and start the stack by running the following command: + - Start the stack with `docker-compose`. ```bash docker-compose up -d ``` @@ -53,6 +58,12 @@ The Grafana dashboard can be accessed by navigating to `http://:3000` i
The default username and password are both `admin`. You will be prompted to change the password on the first login.
Credentials can be changed by editing the [.env](grafana/.env) file. +If you would like to change which targets should be monitored, you can edit the [prometheus.yml](prometheus/prometheus.yml) file. +
The targets section contains a list of all the targets that should be monitored by Prometheus. +
The names defined in the `job_name` section are used to identify the targets in Grafana. +
The `static_configs` section contains the IP addresses of the targets that should be monitored. Actually, they are sourced from the service names defined in the [docker-compose.yml](docker-compose.yml) file. +
If you think that the `scrape_interval` value is too aggressive, you can change it to a more suitable value. + In order to check if the stack is running correctly, you can run the following command: ```bash docker-compose ps