From 8f8e500dc1b8ddf4580c62d6edbae03f96268e2e Mon Sep 17 00:00:00 2001 From: Subhendu Ghosh Date: Tue, 28 May 2002 02:41:30 +0000 Subject: [PATCH] option updates, more examples git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@40 f882894a-f735-0410-b71e-b25c423dba1c --- command.cfg.in | 65 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 51 insertions(+), 14 deletions(-) diff --git a/command.cfg.in b/command.cfg.in index 4ccb26c..adf6306 100644 --- a/command.cfg.in +++ b/command.cfg.in @@ -50,12 +50,12 @@ command[host-notify-by-epager]=/bin/echo '$HOSTALIAS$ is $HOSTSTATE$!' | /bin/ma command[check_tcp]=@libexecdir@/check_tcp -H $HOSTADDRESS$ -p $ARG1$ command[check_udp]=@libexecdir@/check_udp -H $HOSTADDRESS$ -p $ARG1$ command[check_ftp]=@libexecdir@/check_ftp -H $HOSTADDRESS$ -command[check_pop]=@libexecdir@/check_pop $HOSTADDRESS$ -command[check_smtp]=@libexecdir@/check_smtp $HOSTADDRESS$ -command[check_nntp]=@libexecdir@/check_nntp $HOSTADDRESS$ +command[check_pop]=@libexecdir@/check_pop -H $HOSTADDRESS$ +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 $ARG1$ $ARG2$ -command[check_hpjd]=@libexecdir@/check_hpjd $HOSTADDRESS$ public +command[check_users]=@libexecdir@/check_users -w $ARG1$ -c $ARG2$ +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$ command[check_load]=@libexecdir@/check_load $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ @@ -92,7 +92,7 @@ command[snmp_swap]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6. # # Slightly more generic SNMP OIDs -# +# note: using partial textual OIDs here - use numeric oids if you don't have MIBDIRS defined per Net-SNMP (net-snmp.org) command[snmp_procs]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrSystem.hrSystemProcesses -w :$ARG2$ -c :$ARG3$ -l processes @@ -112,6 +112,43 @@ command[snmp_tcpopen]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o tcp. 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' + +# Some snmp based network device checks (requires Net::SNMP perl module) + +# check all admin-up interfaces +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$ + +# check particular interface by snmp ifDescr value (verify uniqueness before using) +command[check_ifoperstatus]=@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 + +# +# SNMP NetApp checks (Jason Truong) +# +# +#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" +# +#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 " +# +#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 "" +# + +# +# SNMP Compaq Insight Agent (oids courtesy of vol) +# +# the following 4 return the following codes: other=1, ok=2, degraded=3, failed=4 +# +#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 " +# +# + + + # This command checks to see if a host is "alive" by pinging it. The # check must result in a 100% packet loss or 5 second (5000ms) round # trip average to produce an error. @@ -135,12 +172,12 @@ command[check-fast-alive]=@libexecdir@/check_fping -H $HOSTADDRESS$ command[check-imap]=@libexecdir@/check_imap $HOSTADDRESS$ # Check RPC services -command[check-rpc]=@libexecdir@/check_rpc -H $HOSTADDRESS$ $ARG1$ +command[check-rpc]=@libexecdir@/check_rpc -H $HOSTADDRESS$ -C $ARG1$ -# Check if the NFS server is running -command[check-nfs]=@libexecdir@/check_rpc -H $HOSTADDRESS$ nfs +# Check if the NFS server is running (version 2 and version 3) +command[check-nfs]=@libexecdir@/check_rpc -H $HOSTADDRESS$ -C nfs -c2,3 -# Check game servers +# Check game servers/bin/ps -axo 'stat uid ppid comm args' command[check_quake]=@libexecdir@/check_game qs $HOSTADDRESS$ command[check_unreal]=@libexecdir@/check_game uns $HOSTADDRESS$ -p $ARG1$ -pf 8 @@ -162,12 +199,12 @@ command[check_nmap_opt_range]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 60 -p command[check_radius]=@libexecdir@/check_radius $ARG1$ $ARG2$ $HOSTADDRESS$ 1812 $ARG3$ -# Check Reply -# This is a command for checking squid proxy servers which uses check -# reply to ensure an HTTP 200 comes back ..... i.e. squid actually +# Check HTTP proxy +# This is a command for checking squid or other proxy servers which uses check +# http to ensure an HTTP 200 comes back ..... i.e. squid actually # serves the page and not an error message. -command[check_squid]=@libexecdir@/check_reply $HOSTADDRESS$ -p $ARG1$ -s 'GET $ARG2$ HTTP/1.0\n\n' -e 'HTTP/1.0 200 OK' +command[check_squid]=@libexecdir@/check_http -H $HOSTADDRESS$ -p $ARG1$ -u $ARG2$ -e 'HTTP/1.0 200 OK' ## Check RealAudio url -- 2.30.2