monitoringunipager
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| monitoringunipager [2018/01/10 12:34] – dh3wr | monitoringunipager [2019/09/26 14:37] (aktuell) – dh3wr | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== Monitoring of Unipager Transmitters | + | ====== Monitoring of Unipager Transmitters on the Unipager |
| - | Ein entsprechendes Plugin für die Websocket-Schnittstelle kann unter [[https:// | + | ===== Overview ===== |
| - | Zur Installation | + | There are three variantes of Nagios plugins available. |
| + | * Solution with JSON Status output of Unipager directly (since Version 1.0.0) | ||
| + | * Websocket based with C++ programm | ||
| + | * Websocket based with Python programm | ||
| + | |||
| + | Also Daniel Dibbets DL6FZ provided a Template for Zabbix. See below for more info. | ||
| + | |||
| + | If you have already Unipager V 1.0.0 or newer installed, the JSON output solution is highly recommended due to performance issues. | ||
| + | |||
| + | ===== Up-to-date Solution with JSON Output ===== | ||
| + | This approach uses the same '' | ||
| + | |||
| + | Add to your '' | ||
| + | < | ||
| + | # ' | ||
| + | define command{ | ||
| + | command_name | ||
| + | command_line | ||
| + | } | ||
| + | |||
| + | # ' | ||
| + | define command{ | ||
| + | command_name | ||
| + | command_line | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | * ARG1: Port of the HTTP Server of Unipager, default is '' | ||
| + | * ARG2: Number of POCSAG transmissions in queue to be exceeded for status '' | ||
| + | * ARG3: Number of POCSAG transmission in queue to be exceeded for status '' | ||
| + | |||
| + | Create a service description for the new commands: | ||
| + | < | ||
| + | # Define a service to check if unipager is connected to a Node | ||
| + | define service{ | ||
| + | use | ||
| + | host_name | ||
| + | service_description | ||
| + | check_command | ||
| + | } | ||
| + | |||
| + | # Define a service to check if unipager queue is too full | ||
| + | define service{ | ||
| + | use | ||
| + | host_name | ||
| + | service_description | ||
| + | check_command | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | The result should be like this: | ||
| + | {{ :: | ||
| + | |||
| + | ===== Websocket Solution ===== | ||
| + | {{: | ||
| + | |||
| + | Ein entsprechendes Plugin für die Websocket-Schnittstelle kann unter [[https:// | ||
| + | * C++ Version (Viele Abhängigkeiten) | ||
| + | * Pyhton2 Version (Einfache Installation) | ||
| + | |||
| + | Dazu muss der Nagios NRPE-Server installiert werden. | ||
| + | < | ||
| + | |||
| + | Zur Installation | ||
| + | < | ||
| + | |||
| + | ==== C++-Version ==== | ||
| + | Mit | ||
| < | < | ||
| + | sudo apt-get install libssl-dev libboost-dev libjson-spirit-dev libboost-system-dev libboost-coroutine-dev libboost-context-dev libboost-thread-dev libboost-program-options-dev | ||
| + | cd UniPagerNagios/ | ||
| make | make | ||
| </ | </ | ||
| Zeile 10: | Zeile 79: | ||
| sudo cp ./ | sudo cp ./ | ||
| </ | </ | ||
| - | ins Zielverzeichnis kopieren. Dann noch dem Benutzer root zuweisen | + | ins Zielverzeichnis kopieren. Dann noch dem Benutzer root zuweisen, sowie ausführbar machen |
| - | < | + | < |
| + | sudo chown root:root / | ||
| + | sudo chmod 755 / | ||
| + | </ | ||
| - | In der Datei /// | + | ==== Pyhton2-Version ==== |
| - | < | + | There is in the same Git-repository a pyhton2 version to do the same. You can find the code in '' |
| - | # 'check_rustpager' | + | |
| - | define command{ | + | |
| - | command_name | + | |
| - | command_line | + | |
| - | } | + | |
| - | </ | + | |
| - | Dann erstellt man eine Datei in /// | + | ==== Generelle Einstellungen für NRPE ==== |
| + | Die Datei ''/ | ||
| + | < | ||
| + | |||
| + | Die Datei ''/ | ||
| + | < | ||
| + | < | ||
| + | |||
| + | ACHTUNG: Nur bei Zugriff von '' | ||
| + | |||
| + | Dann den nagios-nrpe-server neu starten: | ||
| + | < | ||
| + | |||
| + | Auf dem Haupt-Nagios-Server kann man dann mit den NRPE-Plugin den Status abfragen. Dazu erstellt man eine Datei in '' | ||
| < | < | ||
| define host{ | define host{ | ||
| Zeile 38: | Zeile 117: | ||
| host_name | host_name | ||
| service_description | service_description | ||
| - | check_command | + | check_command |
| } | } | ||
| </ | </ | ||
| + | |||
| + | |||
| Die hostgroup, host_name, alias und IP müssen natürlich angepasst werden. Einmal nagios neustarten und schon wird der Status überwacht. | Die hostgroup, host_name, alias und IP müssen natürlich angepasst werden. Einmal nagios neustarten und schon wird der Status überwacht. | ||
| + | |||
| + | ===== Zabbix Template for Unipager ===== | ||
| + | Daniel Dibbets DL6FZ provided a template for Zabbix to monitor the unipager program. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | 6 Items are observed: | ||
| + | * Connected | ||
| + | * Master | ||
| + | * Queue | ||
| + | * Version | ||
| + | * Calls RX | ||
| + | * Calls TX | ||
| + | |||
| + | 3 Triggers are integrated: | ||
| + | * Not Connected | ||
| + | * Queue > 500 | ||
| + | * Queue > 1000 | ||
| + | |||
| + | Data is gathered from Status JSON (http:// | ||
| + | |||
| + | Zabbix will build history and delta information concerning the numberical values. | ||
monitoringunipager.1515587640.txt.gz · Zuletzt geändert: 2018/01/10 12:34 von dh3wr