Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
collectd_graphite_grafana [2017/03/30 19:44] – created brot | collectd_graphite_grafana [2017/07/05 13:40] (current) – [Konfiguration] brot | ||
---|---|---|---|
Line 7: | Line 7: | ||
Fehlen nurnoch Datenquellen. Als alternative für die von munin gesammelten Daten bietet sich [[https:// | Fehlen nurnoch Datenquellen. Als alternative für die von munin gesammelten Daten bietet sich [[https:// | ||
+ | ===== collectd ===== | ||
+ | Da collectd die Datensammlung übernimmt, muss es auf jedem Host installiert werden, der später im Monitoring zu sehen sein soll. collectd ist hier aber dank der Plugin-Architektur sehr flexibel und für alle Linuxe verfügbar. | ||
+ | ==== Installation ==== | ||
+ | |||
+ | <code bash gentoo> | ||
+ | nas brot # grep COLLECT / | ||
+ | COLLECTD_PLUGINS=" | ||
+ | nas brot # emerge -av collectd | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Graphite ===== | ||
+ | |||
+ | Graphite ist aufgeteilt in mehrere Teile, Carbon kümmert sich um das Speichern der Daten, Graphite stellt eine Web-API zur verfügung um die Daten zu queryen bzw diese zu aggregieren. Beide Teile sind in Python geschrieben, | ||
+ | |||
+ | ==== Installation ==== | ||
+ | |||
+ | <code bash -> | ||
+ | root@minipi:/ | ||
+ | </ | ||
+ | |||
+ | ==== Konfiguration ==== | ||
+ | |||
+ | === Carbon === | ||
+ | |||
+ | <file - / | ||
+ | # Schema definitions for Whisper files. Entries are scanned in order, | ||
+ | # and first match wins. This file is scanned for changes every 60 seconds. | ||
+ | # | ||
+ | # [name] | ||
+ | # pattern = regex | ||
+ | # retentions = timePerPoint: | ||
+ | |||
+ | # Carbon' | ||
+ | # CARBON_METRIC_PREFIX and CARBON_METRIC_INTERVAL settings | ||
+ | [carbon] | ||
+ | pattern = ^carbon\. | ||
+ | retentions = 60:90d | ||
+ | |||
+ | [collectd] | ||
+ | pattern = ^collectd.* | ||
+ | retentions = 10s: | ||
+ | |||
+ | [default_1min_for_1day] | ||
+ | pattern = .* | ||
+ | </ | ||
+ | |||
+ | === Graphite-web === | ||
+ | |||
+ | - graphite initialisieren | ||
+ | - graphite api als uwsgi app definieren | ||
+ | - nginx seite definieren | ||
+ | - configs aktivieren, dienste neustarten | ||
+ | |||
+ | <code bash -> | ||
+ | |||
+ | root@minipi:/ | ||
+ | (secret salt setzen) | ||
+ | |||
+ | root@minipi:/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | <file shell / | ||
+ | |||
+ | [uwsgi] | ||
+ | processes = 2 | ||
+ | uid = _graphite | ||
+ | gid = _graphite | ||
+ | chdir = / | ||
+ | file = graphite.wsgi | ||
+ | chmod-socket = 666 | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | <file shell / | ||
+ | # / | ||
+ | |||
+ | server { | ||
+ | listen 80; | ||
+ | |||
+ | location / { | ||
+ | include uwsgi_params; | ||
+ | uwsgi_pass unix:/ | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | <code bash -> | ||
+ | root@minipi:/ | ||
+ | ‘/ | ||
+ | root@minipi:/ | ||
+ | ‘/ | ||
+ | root@minipi:/ | ||
+ | root@minipi:/ | ||
+ | root@minipi:/ | ||
+ | root@minipi:/ | ||
+ | </ | ||
+ | |||
+ | ===== Grafana ===== | ||
+ | |||
+ | ==== Installation ==== | ||
+ | |||
+ | Grafana soll, wie auch der Rest der Software, auf einem Raspberry Pi laufen. Die Grafana-Pakete gibt es allerdings nicht für raspian, und die debian unstable pakete wollen auf einem rpi1 nicht so ohne weiteres laufen. Aber es gibt abhilfe: Ein [[https:// | ||
+ | |||
+ | <code bash -> | ||
+ | apt install apt-transport-https curl | ||
+ | curl https:// | ||
+ | echo "deb https:// | ||
+ | apt update | ||
+ | apt install grafana | ||
+ | </ | ||