Code

qpage definitions
[nagiosplug.git] / command.cfg.in
1 ###############################################################################
2 # COMMAND CONFIGURATION
3 #
4 # $Id$
5 #
6 # SYNTAX:
7 # command[<command_name>]=<command_line>
8 #
9 # <command_name> = A short name used to identify the command
10 # <command_line> = The actual command line.  The command line doesn't have to
11 #    be surrounded in quotes, but may contain quotes as needed within
12 #    the command line.  Take care to use single quotes at the
13 #    outer edges of commands or you will have command line
14 #    expansion problems when the command is executed by the shell.
15 #    Any valid shell command can be used.  Multiple commands can
16 #    be separated with semicolons, piping is allowed.  The 
17 #    command line can contain macros, but not are macros are valid
18 #    at all time (notifications, service checks, etc).  See the
19 #    HTML documentaion for more informationon on using macros in
20 #    commands.
21 #                  
22 # Note: Service check, service notification, host check, host notification,
23 #    service event handler, and host event handler functions are all defined
24 #    here.
25 ###############################################################################
27 # Service notification command - send email with problem summary
29 command[notify-by-email]=/bin/printf "$OUTPUT$" | /bin/mail -s '$SERVICESTATE$ alert for $HOSTALIAS$/$SERVICEDESC$' $CONTACTEMAIL$
31 # Service notification command - send email to alphanumeric pager
32 # gateway The notify-by-epager command assumes that each contact has a
33 # pager email gateway, and that the address has been entered into the
34 # appropriate contact field instead of an actual pager number.
35 # (i.e. 'pagejoe@nowhere.com' routes mail to Joe's alphanumeric pager)
37 command[notify-by-epager]=/bin/echo "$OUTPUT$" | /bin/mail -s '$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$' $CONTACTPAGER$
39 # Host notification commands (one for email, one for alphanumeric
40 # pager with email gateway)
42 command[host-notify-by-email]=/bin/echo -e "***** Nagios *****\n\nHost "$HOSTALIAS$" is $HOSTSTATE$!\n\nDate/Time: $DATETIME$\n" | /bin/mail -s 'Host $HOSTNAME$ is $HOSTSTATE$!' $CONTACTEMAIL$
44 command[host-notify-by-epager]=/bin/echo '$HOSTALIAS$ is $HOSTSTATE$!' | /bin/mail -s 'Host $HOSTNAME$ is $HOSTSTATE$!' $CONTACTPAGER$
47 ## Send notifications to a pager using modem with Qpage (www.qpage.com)
49 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$
51 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$
57 # These are some example service check commands.  See the HTML
58 # documentation on the plugins for examples of how to configure
59 # command definitions.
61 command[check_tcp]=@libexecdir@/check_tcp -H $HOSTADDRESS$ -p $ARG1$
62 command[check_udp]=@libexecdir@/check_udp -H $HOSTADDRESS$ -p $ARG1$
63 command[check_ftp]=@libexecdir@/check_ftp -H $HOSTADDRESS$
64 command[check_pop]=@libexecdir@/check_pop -H $HOSTADDRESS$
65 command[check_smtp]=@libexecdir@/check_smtp -H $HOSTADDRESS$
66 command[check_nntp]=@libexecdir@/check_nntp -H $HOSTADDRESS$
67 command[check_telnet]=@libexecdir@/check_tcp -H $HOSTADDRESS$ -p 23
68 command[check_users]=@libexecdir@/check_users -w $ARG1$ -c $ARG2$
69 command[check_hpjd]=@libexecdir@/check_hpjd -H $HOSTADDRESS$ -C public
70 command[check_mrtg]=@libexecdir@/check_mrtg $ARG1$ 10 AVG $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$
71 command[traffic_average]=@libexecdir@/check_mrtgtraf $ARG1$ 10 AVG $ARG2$ $ARG3$ $ARG4$ $ARG5$
72 command[check_load]=@libexecdir@/check_load $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$
74 command[check_disk]=@libexecdir@/check_disk -w 85% -c 95% -p $ARG1$
75 command[check_dns]=@libexecdir@/check_dns -H www.yahoo.com -s $HOSTADDRESS$
76 command[check_http]=@libexecdir@/check_http -H $HOSTADDRESS$ -I $HOSTADDRESS$
77 command[check_http2]=@libexecdir@/check_http -H $ARG1$ -I $HOSTADDRESS$ -w $ARG2$ -c $ARG3$
78 command[check_pgsql]=@libexecdir@/check_pgsql -H $HOSTADDRESS$ 
79 command[check_ping]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 10:20% -c 60:100%
80 command[check_procs]=@libexecdir@/check_procs -w $ARG1$ -c $ARG2$
81 command[check_procs_zombie]=@libexecdir@/check_procs -w $ARG1$ -c $ARG2$ -s Z
82 command[check_procs_httpd]=@libexecdir@/check_procs -w 5:$ARG1$ -c 1:$ARG2$ -C httpd
83 command[check_vsz]=@libexecdir@/check_vsz -w 8096 -c 16182 -C httpd
85 # An example of using check_by_ssh as an active service check
86 command[ssh_disk]=@libexecdir@/check_by_ssh -H $HOSTADDRESS$ -C '@libexecdir@/check_disk -w 85% -c 95% -p $ARG1$'
88 #
89 # UCD_SNMP equivalents for some of the commands above
90 #
92 command[snmp_load]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.2021.10.1.5.1,.1.3.6.1.4.1.2021.10.1.5.2,.1.3.6.1.4.1.2021.10.1.5.3 -w :$ARG2$,:$ARG3$,:$ARG4$ -w :$ARG5$,:$ARG6$,:$ARG7$ -l load
94 command[snmp_cpustats]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.2021.11.9.0,.1.3.6.1.4.1.2021.11.10.0,.1.3.6.1.4.1.2021.11.11.0 -l 'CPU usage (user system idle)' -u '%'
96 command[snmp_procname]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o 1.3.6.1.4.1.2021.2.1.5.$ARG2$ -w $ARG3$:$ARG4$ -c $ARG5$:$ARG6$
98 command[snmp_disk]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o 1.3.6.1.4.1.2021.9.1.7.$ARG1$,1.3.6.1.4.1.2021.9.1.9.$ARG1$ -w $ARG2$:,:$ARG3$ -c $ARG4$:,:$ARG5$ -u 'kB free (','% used)' -l 'disk space'
100 command[snmp_mem]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.2021.4.6.0,.1.3.6.1.4.1.2021.4.5.0 -w $ARG2$: -c $ARG3$:
102 command[snmp_swap]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.2021.4.4.0,.1.3.6.1.4.1.2021.4.3.0 -w $ARG2$: -c $ARG3$:
105 # Slightly more generic SNMP OIDs
106 # note: using partial textual OIDs here - use numeric oids if you don't have MIBDIRS defined per Net-SNMP (net-snmp.org)
108 command[snmp_procs]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrSystem.hrSystemProcesses -w :$ARG2$ -c :$ARG3$ -l processes
110 command[snmp_users]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrSystem.hrSystemNumUsers -w :$ARG2$ -c :$ARG3$ -l users
112 command[snmp_mem2]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.101,host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.101 -w $ARG2$ -c $ARG3$
114 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$
116 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$
118 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$
120 command[snmp_disk2]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.$ARG2$ -w $ARG3$ -c $ARG4$ 
122 command[snmp_tcpopen]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o tcp.tcpCurrEstab.0 -w $ARG2$ -c $ARG3$
124 command[snmp_tcpstats]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o tcp.tcpActiveOpens.0,tcp.tcpPassiveOpens.0,tcp.tcpInSegs.0,tcp.tcpOutSegs.0,tcp.tcpRetransSegs.0 -l 'TCP stats'
127 # Some snmp based network device checks (requires Net::SNMP perl module)
129 # check all admin-up interfaces
130 command[check_ifstatus]=@libexecdir@/check_ifstatus -H $HOSTADDRESS$ -C public 
132 # check particular interface by snmp ifIndex key
133 command[check_ifoperstatus]=@libexecdir@/check_ifoperstatus -H $HOSTADDRESS$ -C public -k $ARG1$
135 # check particular interface by snmp ifDescr value (verify uniqueness before using)
136 command[check_ifoperstatus]=@libexecdir@/check_ifoperstatus -H $HOSTADDRESS$ -C public -d $ARG1$
138 # verify all you BGP session on a device are running (only returns warning due to some hardcoded option - to be fixed soon)
139 command[check_snmp_bgpstate]=@libexecdir@/check_bgpstate -H $HOSTADDRESS$ -C public
142 # SNMP NetApp checks (Jason Truong)
143
145 #command[check_netapp_uptime]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C public -o .1.3.6.1.2.1.1.3.0 --delimiter=')' -l "Uptime is"
147 #command[check_netapp_cpuload]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C public -o .1.3.6.1.4.1.789.1.2.1.3.0 -w 90 -c 95 -u '%' -l "CPU LOAD " 
149 #command[check_netapp_numdisks]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C public -o .1.3.6.1.4.1.789.1.6.4.1.0,.1.3.6.1.4.1.789.1.6.4.2.0,.1.3.6.1.4.1.789.1.6.4.8.0,.1.3.6.1.4.1.789.1.6.4.7.0 -u 'Total Disks','Active','Spare','Failed' -l ""
153 # SNMP Compaq Insight Agent (oids courtesy of vol)
154
155 # the following 4 return the following codes: other=1, ok=2, degraded=3, failed=4
157 #command[check_compaq_thermalCondition]=@libexec@/check_snmp -H $HOSTADDRESS$ -C public -o .1.3.6.1.4.1.232.6.2.1.0,.1.3.6.1.4.1.232.6.2.2.0,.1.3.6.1.4.1.232.6.2.3.0,.1.3.6.1.4.1.232.6.2.4.0 -u 'ThermalCondition','ThermalTemp','ThermalSystem','ThermalCPUFan' -w 2:2,2:2,2:2,2:2 -c 1:2,1:2,1:2,1:2 -l "Thermal status "
163 # This command checks to see if a host is "alive" by pinging it.  The
164 # check must result in a 100% packet loss or 5 second (5000ms) round
165 # trip average to produce an error.
167 # This command checks to see if a host is "alive" by pinging it.
168 command[check-host-alive]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1
170 # This command checks to see if a printer is "alive" by pinging it.
171 command[check-printer-alive]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1
173 # This command checks to see if a switch is "alive" by pinging it.
174 command[check-switch-alive]=@libexecdir@/check_ping $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1
176 # This command checks to see if a router is "alive" by pinging it.
177 command[check-router-alive]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1
179 # Check if a host is alive by doing a fast ping instead of a regular ping
180 command[check-fast-alive]=@libexecdir@/check_fping -H $HOSTADDRESS$
182 # Check if the IMAP service is alive (default port=143)
183 command[check-imap]=@libexecdir@/check_imap -H $HOSTADDRESS$
185 # Check RPC services
186 command[check-rpc]=@libexecdir@/check_rpc -H $HOSTADDRESS$ -C $ARG1$
188 # Check if the NFS server is running (version 2 and version 3)
189 command[check-nfs]=@libexecdir@/check_rpc -H $HOSTADDRESS$ -C nfs -c2,3
191 # Check game servers
192 command[check_quake]=@libexecdir@/check_game qs $HOSTADDRESS$
193 command[check_unreal]=@libexecdir@/check_game uns $HOSTADDRESS$ -p $ARG1$ -pf 8
195 # Check a port that should be open
196 command[check_nmap]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 30 -p $ARG1$
198 # Check a port that should be open and another that *could* be open,
199 # but no warning is given if optional port is closed.
201 command[check_nmap_optional]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 60 -p $ARG1$ -o $ARG2$
203 # Specify range to nmap
204 command[check_nmap_range]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 60 -p $ARG1$ -r $ARG2$
206 # Specify both optional and range
207 command[check_nmap_opt_range]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 60 -p $ARG1$ -o $ARG2$ -r$ARG3$
209 # Check Radius
210 command[check_radius]=@libexecdir@/check_radius $ARG1$ $ARG2$ $HOSTADDRESS$ 1812 $ARG3$
213 # Check HTTP proxy
214 # This is a command for checking squid or other proxy servers which uses check
215 # http to ensure an HTTP 200 comes back ..... i.e. squid actually
216 # serves the page and not an error message.
217 # Using check_http will allow verification of authenticated proxies
219 # Note:: This used to call "check_reply" which was pretty close to check_tcp
220 #        The functionality of check_reply has been merged into check_tcp
222 command[check_squid]=@libexecdir@/check_http -H $HOSTADDRESS$ -p $ARG1$  -u $ARG2$  -e 'HTTP/1.0 200 OK'
225 ## Check RealAudio url
226 command[check_real_url]=@libexecdir@/check_real $HOSTADDRESS$ -p $ARG1$ -wt $ARG2$ -ct $ARG3$ -to 5 -u $ARG4$
228 ## Check RealAudio server response
229 command[check_real]=@libexecdir@/check_real $HOSTADDRESS$ -p $ARG1$ -wt $ARG2$ -ct $ARG3$ -to 5
231 # NetWare checks via check_nwstat
232 # how many current logins
233 command[check_netware_logins]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v "CONNS" -w $ARG1$ -c $ARG2$
234 # 5 minute avg cpu load
235 command[check_netware_5load]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v "LOAD5" -w 70 -c 90
236 # Netware 5 abends
237 command[check_netware_abend]=@libexecdir@/check_nwstat -H $HOSTADDRESS$ -v "ABENDS" -w 10 -c 30
240 # Still have to write sample entries for the following:
242 # check_ldap
243 # check_overcr