chore: Update README.

This commit is contained in:
Laur Ivan 2023-04-13 00:57:22 +02:00
parent f6ed84b8d6
commit c556601d90

View File

@ -1,6 +1,6 @@
# laurivan.grafana # laurivan.grafana
This role installs Grafana via Docker. This role installs Grafana, InfluxDB and Prometheus via Docker.
## Requirements ## Requirements
@ -19,6 +19,7 @@ grafana_volume_base: "/mnt/data/grafana"
grafana_setup_path: "{{ grafana_volume_base }}/config" grafana_setup_path: "{{ grafana_volume_base }}/config"
grafana_volume_grafana: "{{ grafana_volume_base }}/grafana" grafana_volume_grafana: "{{ grafana_volume_base }}/grafana"
grafana_volume_influxdb: "{{ grafana_volume_base }}/influxdb" grafana_volume_influxdb: "{{ grafana_volume_base }}/influxdb"
grafana_volume_prometheus: "{{ grafana_volume_base }}/prometheus"
``` ```
You can however define specific volumes for the individual items: You can however define specific volumes for the individual items:
@ -26,6 +27,7 @@ You can however define specific volumes for the individual items:
- `grafana_setup_path` - where the Docker compose files are placed - `grafana_setup_path` - where the Docker compose files are placed
- `grafana_volume_grafana` - volume for the grafana docker container - `grafana_volume_grafana` - volume for the grafana docker container
- `grafana_volume_influxdb` - volume for InfluxDB - `grafana_volume_influxdb` - volume for InfluxDB
- `grafana_volume_prometheus` - volume for Prometheus.io
### InfluxDB ### InfluxDB
@ -40,6 +42,25 @@ influxdb:
admin_token: change_me admin_token: change_me
``` ```
### Prometheus
We define Prometheus variables:
```yml
prometheus_port: "9090"
grafana_prometheus_project: my-project
grafana_prometheus_job_name: prometheus
grafana_prometheus_scrape_interval: '120s'
grafana_prometheus_targets:
- "10.0.0.35:9100"
- "10.0.0.35:8080"
```
The targets are locations (ip address + port) where Prometheus polls for new data. This can be [cadvisor](https://github.com/google/cadvisor) or [node exporter](https://github.com/prometheus/node_exporter) for example.
**Note**: Prometheus should be an internal service (i.e., empty `prometheus_port`). Hence, it doesn't have any security in place.
### Grafana ### Grafana
We also define several variables for grafana We also define several variables for grafana