Skip to content

Useful extra Nagios commands

Here are some useful extra nagios commands I often use:

define command{
        command_name    notify-host-by-sms
        command_line    /usr/local/sbin/send-sms.sh -n $CONTACTPAGER$ -m "$HOSTNAME$: $HOSTSTATE$"
}
 
define command{
        command_name    notify-service-by-sms
        # Don't use service state, otherwise you only ever get to see 'critical' and not the reason.
        command_line    /usr/local/sbin/send-sms.sh -n $CONTACTPAGER$ -m "$SERVICEDESC$ on $HOSTNAME$: $SERVICEOUTPUT$"
}
 
define command{
        command_name    check_imaps
        command_line    /usr/lib/nagios/plugins/check_imap -H '$HOSTADDRESS$' --ssl -p 993 --certificate 15
}
 
define command{
        command_name    check_rdp
        command_line    /usr/local/lib/nagios/plugins/check_x224 -H $HOSTADDRESS$ -p $ARG1$ -w 10 -c 50
}
 
define command{
  command_name  check_pops
  command_line  /usr/lib/nagios/plugins/check_pop -H '$HOSTADDRESS$' --ssl -p 995 --certificate 15
}
 
define command{
  command_name  check_smtps
  command_line  /usr/lib/nagios/plugins/check_tcp -H $HOSTADDRESS$ -p 465
}


    No Comments ( Add comment / trackback )