Code

Fix for regex input of '|', being output causing problems with Nagios' parsing of
[nagiosplug.git] / command.cfg.in
index d8bfd2dedc50c079a6f40f7946f0204460c87a7f..aff33d29ccdcbb92b6fcfcb2f1f8b2b261ee45d5 100644 (file)
@@ -1,8 +1,6 @@
 ###############################################################################
 # COMMAND CONFIGURATION
 #
-# $Id$
-#
 # SYNTAX:
 # command[<command_name>]=<command_line>
 #
 # Note: Service check, service notification, host check, host notification,
 #    service event handler, and host event handler functions are all defined
 #    here.
+#
+# Note: Use the convertcfg program in the contrib directory of the Nagios 
+#   distribution to convert this file into a object file format.
+#
 ###############################################################################
 
 # Service notification command - send email with problem summary
@@ -43,6 +45,20 @@ command[host-notify-by-email]=/bin/echo -e "***** Nagios *****\n\nHost "$HOSTALI
 
 command[host-notify-by-epager]=/bin/echo '$HOSTALIAS$ is $HOSTSTATE$!' | /bin/mail -s 'Host $HOSTNAME$ is $HOSTSTATE$!' $CONTACTPAGER$
 
+
+## Send notifications to a pager using modem with Qpage (www.qpage.com)
+
+command[notify-by-qpage]=/usr/bin/printf "Service: %s\nHost: %s\nAddress: %s\nState: %s\nInfo: %s\nDate: %s" '$SERVICEDESC$' '$HOSTNAME$' '$HOSTADDRESS$' '$SERVICESTATE$' '$OUTPUT$' '$DATETIME' | /usr/local/bin/qpage -l 0 -p $CONTACTPAGER$
+
+command[host-notify-by-qpage]=/usr/bin/printf "Host: %s is %s\nInfo: %s\nDate: %s" '$HOSTALIAS$' '$HOSTSTATES$' '$OUTPUT$' '$DATETIME' | /usr/local/bin/qpage -l 0 -p $CONTACTPAGER$
+
+## Send notifications using SMSclient (www.smsclient.org)
+command[notify-by-smsclient]=/usr/bin/sms_client -q $CONTACTPAGER$ "$NOTIFICATIONTYPE$: $HOSTADDRESS$ $HOSTALIAS$: $SERVICEDESC$ is $SERVICESTATE$"
+command[host-notify-by-smsclient]=/usr/bin/sms_client -q $CONTACTPAGER$ "Host $HOSTALIAS$ is $HOSTSTATE$; $OUTPUT$; $DATETIME$"
+
+
+
+
 # These are some example service check commands.  See the HTML
 # documentation on the plugins for examples of how to configure
 # command definitions.
@@ -55,6 +71,9 @@ command[check_smtp]=@libexecdir@/check_smtp -H $HOSTADDRESS$
 command[check_nntp]=@libexecdir@/check_nntp -H $HOSTADDRESS$
 command[check_telnet]=@libexecdir@/check_tcp -H $HOSTADDRESS$ -p 23
 command[check_users]=@libexecdir@/check_users -w $ARG1$ -c $ARG2$
+command[check_ntp]=@libexecdir@/check_ntp -H $HOSTADDRESS$
+command[check_ntp_ntpq]=@libexecdir@/check_ntp -H $HOSTADDRESS$ -j 10 -k 15
+command[check_flexlm]=@libexecdir@/check_flexlm -F $ARG1$
 command[check_hpjd]=@libexecdir@/check_hpjd -H $HOSTADDRESS$ -C public
 command[check_mrtg]=@libexecdir@/check_mrtg $ARG1$ 10 AVG $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$
 command[traffic_average]=@libexecdir@/check_mrtgtraf $ARG1$ 10 AVG $ARG2$ $ARG3$ $ARG4$ $ARG5$
@@ -69,7 +88,8 @@ command[check_ping]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 10:20% -c 60:100
 command[check_procs]=@libexecdir@/check_procs -w $ARG1$ -c $ARG2$
 command[check_procs_zombie]=@libexecdir@/check_procs -w $ARG1$ -c $ARG2$ -s Z
 command[check_procs_httpd]=@libexecdir@/check_procs -w 5:$ARG1$ -c 1:$ARG2$ -C httpd
-command[check_vsz]=@libexecdir@/check_vsz -w 8096 -c 16182 -C httpd
+command[check_procs_vsz]=@libexecdir@/check_procs -w 8096 -c 16182 -C httpd --metric VSZ
+command[check_ups]=@libexecdir@/check_ups -H $HOSTADDRESS$ -u $ARG1$
 
 # An example of using check_by_ssh as an active service check
 command[ssh_disk]=@libexecdir@/check_by_ssh -H $HOSTADDRESS$ -C '@libexecdir@/check_disk -w 85% -c 95% -p $ARG1$'
@@ -102,9 +122,9 @@ command[snmp_mem2]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hr
 
 command[snmp_swap2]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.102,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.102 -w $ARG2$ -c $ARG3$
 
-command[snmp_mem]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.101,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.101 -w $ARG2$ -c $ARG3$
+command[snmp_mem3]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.101,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.101 -w $ARG2$ -c $ARG3$
 
-command[snmp_swap]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.102,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.102 -w $ARG2$ -c $ARG3$
+command[snmp_swap3]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.102,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.102 -w $ARG2$ -c $ARG3$
 
 command[snmp_disk2]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.$ARG2$ -w $ARG3$ -c $ARG4$ 
 
@@ -119,10 +139,10 @@ command[snmp_tcpstats]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o tcp
 command[check_ifstatus]=@libexecdir@/check_ifstatus -H $HOSTADDRESS$ -C public 
 
 # check particular interface by snmp ifIndex key
-command[check_ifoperstatus]=@libexecdir@/check_ifoperstatus -H $HOSTADDRESS$ -C public -k $ARG1$
+command[check_ifoperstatus_ifindex]=@libexecdir@/check_ifoperstatus -H $HOSTADDRESS$ -C public -k $ARG1$
 
 # check particular interface by snmp ifDescr value (verify uniqueness before using)
-command[check_ifoperstatus]=@libexecdir@/check_ifoperstatus -H $HOSTADDRESS$ -C public -d $ARG1$
+command[check_ifoperstatus_ifdescr]=@libexecdir@/check_ifoperstatus -H $HOSTADDRESS$ -C public -d $ARG1$
 
 # verify all you BGP session on a device are running (only returns warning due to some hardcoded option - to be fixed soon)
 command[check_snmp_bgpstate]=@libexecdir@/check_bgpstate -H $HOSTADDRESS$ -C public
@@ -217,13 +237,34 @@ command[check_real_url]=@libexecdir@/check_real $HOSTADDRESS$ -p $ARG1$ -wt $ARG
 ## Check RealAudio server response
 command[check_real]=@libexecdir@/check_real $HOSTADDRESS$ -p $ARG1$ -wt $ARG2$ -ct $ARG3$ -to 5
 
-# NetWare checks via check_nwstat
+# NetWare checks via check_nwstat ( see "check_nwstat -h" for more options)
 # how many current logins
-command[check_netware_logins]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v "CONNS" -w $ARG1$ -c $ARG2$
+command[check_netware_logins]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v "LOGINS" -w $ARG1$ -c $ARG2$
+# how many current connections
+command[check_nwstat_conns]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v CONNS -w $ARG1$ -c $ARG2$
+# 1 minute avg cpu load
+command[check_netware_1load]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v "LOAD1" -w 70 -c 90
 # 5 minute avg cpu load
 command[check_netware_5load]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v "LOAD5" -w 70 -c 90
+# 15 minute avg cpu load
+command[check_netware_15load]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v "LOAD15" -w 70 -c 90
+# Disk volume (% free)
+command[check_nwstat_vol_p]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v VPF$ARG1$ -w $ARG2$ -c $ARG3$
+# Disk volume (KB free)
+command[check_nwstat_vol_k]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v VKF$ARG1$ -w $ARG2$ -c $ARG3$
+# % Long term cache hits
+command[check_nwstat_ltch]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v LTCH -w $ARG1$ -c $ARG2$
+# % (of max) used packet receive buffers
+command[check_nwstat_puprb]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v PUPRB -w $ARG1$ -c $ARG2$
+# Check to see if the DS database is open
+command[check_nwstat_dsdb]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v DSDB
+
+
+
 # Netware 5 abends
 command[check_netware_abend]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v "ABENDS" -w 10 -c 30
+# Netware 5 number of current service procs
+command[check_nwstat_csprocs]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v CSPROCS -w $ARG1$ -c $ARG2$
 
 
 # Still have to write sample entries for the following: