command.cfg.in 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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. ###############################################################################
  26. # Service notification command - send email with problem summary
  27. command[notify-by-email]=/bin/printf "$OUTPUT$" | /bin/mail -s '$SERVICESTATE$ alert for $HOSTALIAS$/$SERVICEDESC$' $CONTACTEMAIL$
  28. # Service notification command - send email to alphanumeric pager
  29. # gateway The notify-by-epager command assumes that each contact has a
  30. # pager email gateway, and that the address has been entered into the
  31. # appropriate contact field instead of an actual pager number.
  32. # (i.e. 'pagejoe@nowhere.com' routes mail to Joe's alphanumeric pager)
  33. command[notify-by-epager]=/bin/echo "$OUTPUT$" | /bin/mail -s '$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$' $CONTACTPAGER$
  34. # Host notification commands (one for email, one for alphanumeric
  35. # pager with email gateway)
  36. 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$
  37. command[host-notify-by-epager]=/bin/echo '$HOSTALIAS$ is $HOSTSTATE$!' | /bin/mail -s 'Host $HOSTNAME$ is $HOSTSTATE$!' $CONTACTPAGER$
  38. # These are some example service check commands. See the HTML
  39. # documentation on the plugins for examples of how to configure
  40. # command definitions.
  41. command[check_tcp]=@libexecdir@/check_tcp -H $HOSTADDRESS$ -p $ARG1$
  42. command[check_udp]=@libexecdir@/check_udp -H $HOSTADDRESS$ -p $ARG1$
  43. command[check_ftp]=@libexecdir@/check_ftp -H $HOSTADDRESS$
  44. command[check_pop]=@libexecdir@/check_pop $HOSTADDRESS$
  45. command[check_smtp]=@libexecdir@/check_smtp $HOSTADDRESS$
  46. command[check_nntp]=@libexecdir@/check_nntp $HOSTADDRESS$
  47. command[check_telnet]=@libexecdir@/check_tcp -H $HOSTADDRESS$ -p 23
  48. command[check_users]=@libexecdir@/check_users $ARG1$ $ARG2$
  49. command[check_hpjd]=@libexecdir@/check_hpjd $HOSTADDRESS$ public
  50. command[check_mrtg]=@libexecdir@/check_mrtg $ARG1$ 10 AVG $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$
  51. command[traffic_average]=@libexecdir@/check_mrtgtraf $ARG1$ 10 AVG $ARG2$ $ARG3$ $ARG4$ $ARG5$
  52. command[check_load]=@libexecdir@/check_load $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$
  53. command[check_disk]=@libexecdir@/check_disk -w 85% -c 95% -p $ARG1$
  54. command[check_dns]=@libexecdir@/check_dns -H www.yahoo.com -s $HOSTADDRESS$
  55. command[check_http]=@libexecdir@/check_http -H $HOSTADDRESS$ -I $HOSTADDRESS$
  56. command[check_http2]=@libexecdir@/check_http -H $ARG1$ -I $HOSTADDRESS$ -w $ARG2$ -c $ARG3$
  57. command[check_pgsql]=@libexecdir@/check_pgsql -H $HOSTADDRESS$
  58. command[check_ping]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 10:20% -c 60:100%
  59. command[check_procs]=@libexecdir@/check_procs -w $ARG1$ -c $ARG2$
  60. command[check_procs_zombie]=@libexecdir@/check_procs -w $ARG1$ -c $ARG2$ -s Z
  61. command[check_procs_httpd]=@libexecdir@/check_procs -w 5:$ARG1$ -c 1:$ARG2$ -C httpd
  62. command[check_vsz]=@libexecdir@/check_vsz -w 8096 -c 16182 -C httpd
  63. # An example of using check_by_ssh as an active service check
  64. command[ssh_disk]=@libexecdir@/check_by_ssh -H $HOSTADDRESS$ -C '@libexecdir@/check_disk -w 85% -c 95% -p $ARG1$'
  65. #
  66. # UCD_SNMP equivalents for some of the commands above
  67. #
  68. 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
  69. 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 '%'
  70. 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$
  71. 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'
  72. 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$:
  73. 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$:
  74. #
  75. # Slightly more generic SNMP OIDs
  76. #
  77. command[snmp_procs]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrSystem.hrSystemProcesses -w :$ARG2$ -c :$ARG3$ -l processes
  78. command[snmp_users]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrSystem.hrSystemNumUsers -w :$ARG2$ -c :$ARG3$ -l users
  79. 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$
  80. 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$
  81. 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$
  82. 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$
  83. command[snmp_disk2]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.$ARG2$ -w $ARG3$ -c $ARG4$
  84. command[snmp_tcpopen]=@libexecdir@/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o tcp.tcpCurrEstab.0 -w $ARG2$ -c $ARG3$
  85. 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'
  86. # This command checks to see if a host is "alive" by pinging it. The
  87. # check must result in a 100% packet loss or 5 second (5000ms) round
  88. # trip average to produce an error.
  89. # This command checks to see if a host is "alive" by pinging it.
  90. command[check-host-alive]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1
  91. # This command checks to see if a printer is "alive" by pinging it.
  92. command[check-printer-alive]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1
  93. # This command checks to see if a switch is "alive" by pinging it.
  94. command[check-switch-alive]=@libexecdir@/check_ping $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1
  95. # This command checks to see if a router is "alive" by pinging it.
  96. command[check-router-alive]=@libexecdir@/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1
  97. # Check if a host is alive by doing a fast ping instead of a regular ping
  98. command[check-fast-alive]=@libexecdir@/check_fping -H $HOSTADDRESS$
  99. # Check if the IMAP service is alive (default port=143)
  100. command[check-imap]=@libexecdir@/check_imap $HOSTADDRESS$
  101. # Check RPC services
  102. command[check-rpc]=@libexecdir@/check_rpc -H $HOSTADDRESS$ $ARG1$
  103. # Check if the NFS server is running
  104. command[check-nfs]=@libexecdir@/check_rpc -H $HOSTADDRESS$ nfs
  105. # Check game servers
  106. command[check_quake]=@libexecdir@/check_game qs $HOSTADDRESS$
  107. command[check_unreal]=@libexecdir@/check_game uns $HOSTADDRESS$ -p $ARG1$ -pf 8
  108. # Check a port that should be open
  109. command[check_nmap]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 30 -p $ARG1$
  110. # Check a port that should be open and another that *could* be open,
  111. # but no warning is given if optional port is closed.
  112. command[check_nmap_optional]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 60 -p $ARG1$ -o $ARG2$
  113. # Specify range to nmap
  114. command[check_nmap_range]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 60 -p $ARG1$ -r $ARG2$
  115. # Specify both optional and range
  116. command[check_nmap_opt_range]=@libexecdir@/check_nmap -H $HOSTADDRESS$ -t 60 -p $ARG1$ -o $ARG2$ -r$ARG3$
  117. # Check Radius
  118. command[check_radius]=@libexecdir@/check_radius $ARG1$ $ARG2$ $HOSTADDRESS$ 1812 $ARG3$
  119. # Check Reply
  120. # This is a command for checking squid proxy servers which uses check
  121. # reply to ensure an HTTP 200 comes back ..... i.e. squid actually
  122. # serves the page and not an error message.
  123. command[check_squid]=@libexecdir@/check_reply $HOSTADDRESS$ -p $ARG1$ -s 'GET $ARG2$ HTTP/1.0\n\n' -e 'HTTP/1.0 200 OK'
  124. ## Check RealAudio url
  125. command[check_real_url]=@libexecdir@/check_real $HOSTADDRESS$ -p $ARG1$ -wt $ARG2$ -ct $ARG3$ -to 5 -u $ARG4$
  126. ## Check RealAudio server response
  127. command[check_real]=@libexecdir@/check_real $HOSTADDRESS$ -p $ARG1$ -wt $ARG2$ -ct $ARG3$ -to 5
  128. # Still have to write sample entries for the following:
  129. #
  130. # check_ldap
  131. # check_nwstat
  132. # check_overcr