zettelkasten/Eingang/Grafana-prometheus-synology.md
Ralf Koop 0a665cd6c7 .
2024-03-23 09:59:45 +01:00

2.0 KiB

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 volume create prometheus-data
    sudo volume create prometheus-conf

Compose:

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/@/:/var/lib/: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