h4cking, ham radio, fire fighting and m0re

Monitor a DAPNET Transmitter With Nagios

After describing how to get notified of system criticalities via pager I wanted to have my DAPNET transmitters monitored via Nagios. A basic description can be found under [1]. Firstly you need to set up the plugin check_http_json. The source and installation hints can be found on [2]. That enables Nagios to query the DAPNET master using a JSON request and process the result.

A little different to the manual by RWTH Aachen I also configured the hostname of the master in /etc/nagios3/resource.cfg in order to have it not depend on the hostname of the Nagios host.

I added the following to /etc/nagios3/resouce.cfg:


These are parameters that can now be used for defining a service that checks the status of a DAPNET client resp. POCSAG transmitter. An example config for monitoring the POCSAG transmitter at DB0DDE is:

define service {
        use                             generic-service
        host_name                       DB0DDE
        service_description             Funkrufsender DB0DDE
        contact_groups                  admins, DF2ET
        check_command                   check_http_json!8080!transmitters/db0dde!status!ONLINE

The check_http_json needs to be added to /etc/nagios3/command.cfg:

define command{
   command_name   check_http_json
   command_line   /usr/lib/nagios/plugins/ -H "$USER11$" -P $ARG1$ -p $ARG2$ -B $USER12$:$USER13$ -Q "$ARG3$,$ARG4$"

That also defines the usage of the variables set in resources.cfg.

There you go having your Nagios system monitoring a DAPNET transmitter. In my case the alarm in case of a failure is sent to me via email and pager alarm. The latter using a different transmitter of course ;-). The result in form of a picture can be seen in my previous post [3].