.
This commit is contained in:
parent
964241213c
commit
9a8592e703
87
Eingang/Grafana-prometheus-synology.md
Normal file
87
Eingang/Grafana-prometheus-synology.md
Normal file
@ -0,0 +1,87 @@
|
||||
Syno Community
|
||||
DSM - Paketzentrum - Einstellungen - Paketquellen - Hinzufügen - Name und Adresse: https://packages.synocommunity.com/
|
||||
Community - Paket installieren
|
||||
- SynoCli File Tools
|
||||
Ordner erstellen in der File Station:
|
||||
/volume1/docker/grafana
|
||||
Putty-SSH: Befehle einzelnt eingeben
|
||||
sudo -i
|
||||
chown -R 472:472 /volume1/docker/grafana
|
||||
sudo docker volume create prometheus-data
|
||||
sudo docker volume create prometheus-conf
|
||||
|
||||
Docker Compose:
|
||||
```Plaintext
|
||||
version: '3'
|
||||
services:
|
||||
Prometheus:
|
||||
image: prom/prometheus
|
||||
container_name: prometheus
|
||||
ports:
|
||||
- 9090:9090
|
||||
volumes:
|
||||
- prometheus-data:/prometheus
|
||||
- prometheus-conf:/etc/prometheus
|
||||
restart: unless-stopped
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
container_name: grafana
|
||||
ports:
|
||||
- 3000:3000
|
||||
volumes:
|
||||
- /volume1/docker/grafana:/var/lib/grafana
|
||||
restart: unless-stopped
|
||||
Cadvisor:
|
||||
image: google/cadvisor:latest
|
||||
container_name: cadvisor
|
||||
ports:
|
||||
- 8080:8080
|
||||
volumes:
|
||||
- /:/rootfs:ro
|
||||
- /var/run:/var/run:rw
|
||||
- /sys:/sys:ro
|
||||
- /volume1/@docker/:/var/lib/docker:ro
|
||||
restart: unless-stopped
|
||||
node-exporter:
|
||||
image: prom/node-exporter:latest
|
||||
container_name: node-exporter
|
||||
ports:
|
||||
- 9100:9100
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
prometheus-data:
|
||||
external: true
|
||||
prometheus-conf:
|
||||
external: true
|
||||
```
|
||||
Putty - SSH:
|
||||
cd /volume1/@docker/volumes/prometheus-conf/_data
|
||||
nano prometheus.yml
|
||||
|
||||
- job_name: "synology node exporter"
|
||||
scrape_interval: 5s
|
||||
static_configs:
|
||||
- targets: ['your-synology-ip:9100']
|
||||
|
||||
- job_name: "cadvisor"
|
||||
scrape_interval: 55s
|
||||
static_configs:
|
||||
- targets: ['your-synology-ip:8080']
|
||||
|
||||
Strg+o=Speichern - Enter - strg+x=Verlassen
|
||||
Darauf achten, dass eure IP eingetragen ist.
|
||||
Prometheus neu starten
|
||||
|
||||
Grafana Konfiguration
|
||||
Benutzer/Passwort: admin/admin
|
||||
|
||||
neues Passwort mindestens 6 Zeichen
|
||||
|
||||
Unten links Einstellungen - Prometheus als Quelle hinzufügen
|
||||
|
||||
Url: http://your-synology-ip:9090
|
||||
save and test
|
||||
|
||||
Dashboard - Import - Cadvisor exporter=14282
|
||||
|
||||
Dashboard - Import - node-exporter-full=1860
|
Loading…
Reference in New Issue
Block a user