Benutzer-Werkzeuge

Webseiten-Werkzeuge


monitoringunipager

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
monitoringunipager [2018/02/26 21:42] – dh3wrmonitoringunipager [2019/09/26 14:37] (aktuell) – dh3wr
Zeile 6: Zeile 6:
   * Websocket based with C++ programm   * Websocket based with C++ programm
   * Websocket based with Python 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. 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 =====+===== Up-to-date Solution with JSON Output =====
 This approach uses the same ''check_http_json'' Nagios plugin as  [[monitoringnagios|here]]. For further information on installation refere to this site. No ''nagios-nrpe-server'' is needed (although it makes sense to use it for temperature monitoring, disk space, etc.) This approach uses the same ''check_http_json'' Nagios plugin as  [[monitoringnagios|here]]. For further information on installation refere to this site. No ''nagios-nrpe-server'' is needed (although it makes sense to use it for temperature monitoring, disk space, etc.)
  
Zeile 25: Zeile 27:
         command_line    /usr/lib/nagios/plugins/check_http_json -H '$HOSTNAME$' -P $ARG1$ -p status -w queue,$ARG2$ -c queue,$ARG3$         command_line    /usr/lib/nagios/plugins/check_http_json -H '$HOSTNAME$' -P $ARG1$ -p status -w queue,$ARG2$ -c queue,$ARG3$
 } }
-<file> +</file>
- +
  
 +  * ARG1: Port of the HTTP Server of Unipager, default is ''8073''
 +  * ARG2: Number of POCSAG transmissions in queue to be exceeded for status ''warning''
 +  * ARG3: Number of POCSAG transmission in queue to be exceeded for status ''critical''
  
 +Create a service description for the new commands:
 +<file>
 +# Define a service to check if unipager is connected to a Node
 +define service{
 +        use                             generic-service-rwthafu
 +        host_name                       c9000.db0sda.ampr.org
 +        service_description             UniPager Connection to DAPNET Core
 +        check_command                   check_unipager_connected!8073
 +        }
  
 +# Define a service to check if unipager queue is too full
 +define service{
 +        use                             generic-service-rwthafu
 +        host_name                       c9000.db0sda.ampr.org
 +        service_description             UniPager Queue
 +        check_command                   check_unipager_queue!8073!100!150
 +        }
 +</file>
  
 +The result should be like this:
 +{{ ::monitoring:nagios_json_connection_and_queue.png?direct&800 |}}
  
 +===== Websocket Solution =====
 +{{:icons:warning.png?direct |}}{{ :icons:warning.png?direct|}}The websocket methods are superseeded by the JSON method. Please use the new one. The following documentation is for historical reasons only.
  
 Ein entsprechendes Plugin für die Websocket-Schnittstelle kann unter [[https://github.com/rwth-afu/UniPagerNagios|https://github.com/rwth-afu/UniPagerNagios]] heruntergeladen werden. Es gibt 2 Varianten: Ein entsprechendes Plugin für die Websocket-Schnittstelle kann unter [[https://github.com/rwth-afu/UniPagerNagios|https://github.com/rwth-afu/UniPagerNagios]] heruntergeladen werden. Es gibt 2 Varianten:
Zeile 44: Zeile 68:
 <code>git clone https://github.com/rwth-afu/UniPagerNagios.git</code>. <code>git clone https://github.com/rwth-afu/UniPagerNagios.git</code>.
  
-===== C++-Version =====+==== C++-Version ====
 Mit Mit
 <code> <code>
Zeile 61: Zeile 85:
 </code> </code>
  
-===== Pyhton2-Version ===== +==== Pyhton2-Version ==== 
-FIXME+There is in the same Git-repository a pyhton2 version to do the same. You can find the code in ''python/check_unipager'' . The setup is almost the same as for the C++ version. As this method is overseeded by the JSON approach, there is no further documentation here for the moment.
  
-===== Generelle Einstellungen ===== +==== Generelle Einstellungen für NRPE ==== 
-Die Datei ///etc/nagios/nrpe.cfg// entsprechen anpassen, insbesondere:+Die Datei ''/etc/nagios/nrpe.cfg'' entsprechen anpassen, insbesondere:
 <code>allowed_hosts=127.0.0.1,44.225.x.y</code> <code>allowed_hosts=127.0.0.1,44.225.x.y</code>
  
-Die Datei ///etc/nagios/nrpe.d/check_unipager.cfg// erstellen mit Inhalt+Die Datei ''/etc/nagios/nrpe.d/check_unipager.cfg'' erstellen mit Inhalt
 <code>sudo nano /etc/nagios/nrpe.d/check_unipager.cfg</code> <code>sudo nano /etc/nagios/nrpe.d/check_unipager.cfg</code>
 <file>command[check_unipager]=/usr/lib/nagios/plugins/check_unipager -H localhost</file> <file>command[check_unipager]=/usr/lib/nagios/plugins/check_unipager -H localhost</file>
  
-ACHTUNG: Nur bei Zugriff von //localhost// aus braucht man ab der Version 0.7.1 von [[unipager|UniPager]] kein Passwort.+ACHTUNG: Nur bei Zugriff von ''localhost'' aus braucht man ab der Version 0.7.1 von [[unipager|UniPager]] kein Passwort.
  
 Dann den nagios-nrpe-server neu starten: Dann den nagios-nrpe-server neu starten:
 <code>service nagios-nrpe-server restart</code> <code>service nagios-nrpe-server restart</code>
  
-Auf dem Haupt-Nagios-Server kann man dann mit den NRPE-Plugin den Status abfragen. Dazu erstellt man eine Datei in ///etc/nagios3/conf.d// mit z.B. dem Hostnamen //c9000.db0sda.ampr.org.cfg// und dem Inhalt+Auf dem Haupt-Nagios-Server kann man dann mit den NRPE-Plugin den Status abfragen. Dazu erstellt man eine Datei in ''/etc/nagios3/conf.d'' mit z.B. dem Hostnamen''c9000.db0sda.ampr.org.cfg'' und dem Inhalt
 <file> <file>
 define host{ define host{
Zeile 100: Zeile 124:
  
 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.
 +
 +{{ :monitoring:zbx_unipager_template.xml |Download Template here}}
 +
 +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://{HOST.NAME}:8073/status)
 +
 +Zabbix will build history and delta information concerning the numberical values.
monitoringunipager.1519681366.txt.gz · Zuletzt geändert: 2018/02/26 21:42 von dh3wr