Nagios service checks

Once the plugins are declared in the Nagios configuration, they can be used to write service check definitions as demonstrated here.

Example C.4. Sample service check for STUN/TURN

define service{
        use                             generic-service
        host_name                       turn-server.example.org
        service_description             STUN/TURN
        check_command                   check_stun
}

The following test SIP on port 5061 and 443:

Example C.5. Sample service check for SIP over TLS

define service{
        use                             generic-service
        host_name                       server1
        service_description             SIPS
        check_command                   check_sip_tls_port!sip-server.example.org!5061
}

Example C.6. Sample service check for SIP over TLS (port 443)

define service{
        use                             generic-service
        host_name                       server1
        service_description             SIPS 443
        check_command                   check_sip_tls_port!sip-server.example.org!443
}

The following monitors the XMPP service. Notice that the argument used for this check must be the XMPP domain, not the server domain or hostname. In the example, it is example.org.

Example C.7. Sample service check for XMPP

define service{
        use                             generic-service
        host_name                       server1
        service_description             XMPP
        check_command                   check_xmpp!example.org
}