Kapacitor
Zur Navigation springen
Zur Suche springen
Install
- wget https://dl.influxdata.com/kapacitor/releases/kapacitor_1.2.0_amd64.deb
- sudo dpkg -i kapacitor_1.2.0_amd64.deb
- systemctl start kapacitor
Configuration
- kapacitord config > kapacitor.conf (Konfigurationsdatei anlegen)
- vi /etc/kapacitor/kapacitor.conf
# Multiple InfluxDB configurations can be defined. # Exactly one must be marked as the default. # Each one will be given a name and can be referenced in batch queries and InfluxDBOut nodes. [[influxdb]] # Connect to an InfluxDB cluster # Kapacitor can subscribe, query and write to this cluster. # Using InfluxDB is not required and can be disabled. enabled = true default = true name = "telegraf" urls = ["http://localhost:8086"] username = "telegraf" password = "oimel" timeout = 0 # Absolute path to pem encoded CA file. # A CA can be provided without a key/cert pair # ssl-ca = "/etc/kapacitor/ca.pem" # Absolutes paths to pem encoded key and cert files. # ssl-cert = "/etc/kapacitor/cert.pem" # ssl-key = "/etc/kapacitor/key.pem"
Connect Chronograf to Kapacitor
- Access über http://<HOSTNAME>:8888
- Links auf das Zahnrad-Symbol und dort auf "Configuration" klicken, anschließend auf "Add Kapacitor"
- Die gewünschten Daten wie unten im Bild eintragen und auf "Connect" klicken
- Wenn das nächste Bild wie das im unteren Screenshot aus sieht, war die Verbindung erfolgreich
Configure Kapacitor to send Mails
Alert konfigurieren
- Links auf das dreieckige Achtung-Symbol klicken und dort auf "Alert Rules", im daraufhin erscheinenden Bildschirm auf "Create Rule"
- Aus der entsprechenden Datenbank den zu überwachenden Wert auf dem entsprechenden Host einstellen, wenn ein Graph erscheint, ist die Auswahl korrekt
- Den Bereich "Send Alert Where" nach den entsprechenden Wünschen einstellen, außerdem bei "Alert Message" in den Bereich "Email Addresses" die Empfänger der Benachrichtigung und die zu versendente Nachricht eintragen
- Darauf achten, dass die Alert Rule auch enabled ist