Nagios plugins

It is necessary to download and install the individual Nagios plugin scripts. Once that is done, the plugins must be declared in the Nagios configuration. They can be used over and over again to create configurations for monitoring different services on different hosts.

As the TURN server uses the STUN protocol, a STUN test script is sufficient to test the TURN server is operational.

Example C.1. Sample /etc/nagios-plugins/config/stun.cfg

# can be used to check STUN and TURN servers
# uses script from http://karlsbakk.net/asterisk/scripts/check_stun
define command {
        command_name check_stun
        command_line /usr/local/lib/nagios/plugins/check_stun $HOSTADDRESS$
}

Example C.2. Sample /etc/nagios-plugins/config/sip.cfg

# uses script from https://github.com/ibc/nagios-sip-plugin
define command {
        command_name check_sip_tls
        command_line /usr/local/lib/nagios/plugins/check_sip2 -t tls -p $ARG2$ -T 5 -s $ARG1$
}

Example C.3. Sample /etc/nagios-plugins/config/xmpp.cfg

# uses script from https://exchange.icinga.org/jandd/check_xmppng
# Debian/Ubuntu: apt-get install nagios-check-xmppng
define command {
        command_name check_xmpp
        command_line /usr/lib/nagios/plugins/check_xmppng -H $HOSTADDRESS$ --servername $ARG1$
}