| [48] | 1 | ################################################################################ |
|---|
| 2 | # Sample object config file for Nagios |
|---|
| 3 | # |
|---|
| 4 | # Read the documentation for more information on this configuration file. I've |
|---|
| 5 | # provided some comments here, but things may not be so clear without further |
|---|
| 6 | # explanation, so make sure to read the HTML documentation! |
|---|
| 7 | # |
|---|
| 8 | # Last Modified: 12-15-2005 |
|---|
| 9 | # |
|---|
| 10 | ################################################################################ |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | ################################################################################ |
|---|
| 14 | # COMMAND DEFINITIONS |
|---|
| 15 | # |
|---|
| 16 | # SYNTAX: |
|---|
| 17 | # |
|---|
| 18 | # define command{ |
|---|
| 19 | # template <templatename> |
|---|
| 20 | # name <objectname> |
|---|
| 21 | # command_name <commandname> |
|---|
| 22 | # command_line <commandline> |
|---|
| 23 | # } |
|---|
| 24 | # |
|---|
| 25 | # WHERE: |
|---|
| 26 | # |
|---|
| 27 | # <templatename> = object name of another command definition that should be |
|---|
| 28 | # used as a template for this definition (optional) |
|---|
| 29 | # <objectname> = object name of command definition, referenced by other |
|---|
| 30 | # command definitions that use it as a template (optional) |
|---|
| 31 | # <commandname> = name of the command, as recognized/used by Nagios |
|---|
| 32 | # <commandline> = command line |
|---|
| 33 | # |
|---|
| 34 | ################################################################################ |
|---|
| 35 | |
|---|
| [429] | 36 | # 'check_http_heartbeat' command definition |
|---|
| 37 | define command{ |
|---|
| 38 | command_name check_http_heartbeat |
|---|
| 39 | command_line $USER1$/check_http -H $HOSTADDRESS$ -u /heartbeat/http -s 1 |
|---|
| 40 | } |
|---|
| [48] | 41 | |
|---|
| [429] | 42 | # 'check_https_cert' command definition |
|---|
| 43 | define command{ |
|---|
| 44 | command_name check_https_cert |
|---|
| [896] | 45 | command_line $USER1$/check_https -H $HOSTADDRESS$ -S -C $ARG1$ |
|---|
| [429] | 46 | } |
|---|
| 47 | |
|---|
| [896] | 48 | # 'check_https_cert' command definition |
|---|
| 49 | define command{ |
|---|
| 50 | command_name check_https_cert_444 |
|---|
| 51 | command_line $USER1$/check_https -H $HOSTADDRESS$ -p 444 -S -C $ARG1$ |
|---|
| 52 | } |
|---|
| 53 | |
|---|
| [48] | 54 | # 'check_local_disk' command definition |
|---|
| 55 | define command{ |
|---|
| 56 | command_name check_local_disk |
|---|
| 57 | command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ |
|---|
| 58 | } |
|---|
| 59 | |
|---|
| 60 | |
|---|
| 61 | # 'check_local_load' command definition |
|---|
| 62 | define command{ |
|---|
| 63 | command_name check_local_load |
|---|
| 64 | command_line $USER1$/check_load -w $ARG1$ -c $ARG2$ |
|---|
| 65 | } |
|---|
| 66 | |
|---|
| 67 | |
|---|
| 68 | # 'check_local_procs' command definition |
|---|
| 69 | define command{ |
|---|
| 70 | command_name check_local_procs |
|---|
| 71 | command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ |
|---|
| 72 | } |
|---|
| 73 | #command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$ |
|---|
| 74 | |
|---|
| 75 | |
|---|
| 76 | # 'check_local_users' command definition |
|---|
| 77 | define command{ |
|---|
| 78 | command_name check_local_users |
|---|
| 79 | command_line $USER1$/check_users -w $ARG1$ -c $ARG2$ |
|---|
| 80 | } |
|---|
| 81 | |
|---|
| 82 | ################################################################################ |
|---|
| 83 | # |
|---|
| 84 | # SAMPLE HOST CHECK COMMANDS |
|---|
| 85 | # |
|---|
| 86 | ################################################################################ |
|---|
| 87 | |
|---|
| 88 | |
|---|
| 89 | # This command checks to see if a host is "alive" by pinging it |
|---|
| 90 | # The check must result in a 100% packet loss or 5 second (5000ms) round trip |
|---|
| 91 | # average time to produce a critical error. |
|---|
| 92 | # Note: Only one ICMP echo packet is sent (determined by the '-p 1' argument) |
|---|
| 93 | |
|---|
| 94 | # 'check-host-alive' command definition |
|---|
| 95 | #define command{ |
|---|
| 96 | # command_name check-host-alive |
|---|
| 97 | # command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 1 |
|---|
| 98 | # } |
|---|
| 99 | |
|---|
| [716] | 100 | #define command{ |
|---|
| 101 | # command_name check-host-alive |
|---|
| 102 | # command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 99,99% -c 100,100% -p 1 |
|---|
| 103 | # } |
|---|
| [48] | 104 | |
|---|
| 105 | define command { |
|---|
| 106 | command_name check_remote_users |
|---|
| 107 | command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_users -a $ARG1$ $ARG2$ |
|---|
| 108 | } |
|---|
| 109 | |
|---|
| 110 | define command { |
|---|
| 111 | command_name check_remote_load |
|---|
| 112 | command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_load -a $ARG1$ $ARG2$ |
|---|
| 113 | } |
|---|
| 114 | |
|---|
| 115 | define command { |
|---|
| 116 | command_name check_remote_disk |
|---|
| 117 | command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_disk -a $ARG1$ $ARG2$ |
|---|
| 118 | } |
|---|
| 119 | |
|---|
| 120 | define command { |
|---|
| 121 | command_name check_remote_disk_p |
|---|
| 122 | command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_disk_p -a $ARG1$ $ARG2$ $ARG3$ |
|---|
| 123 | } |
|---|
| 124 | |
|---|
| 125 | define command { |
|---|
| 126 | command_name check_remote_procs |
|---|
| 127 | command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs -a $ARG1$ $ARG2$ |
|---|
| 128 | } |
|---|
| 129 | |
|---|
| 130 | define command { |
|---|
| 131 | command_name check_remote_procs_C |
|---|
| 132 | command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs_C -a $ARG1$ $ARG2$ $ARG3$ |
|---|
| 133 | } |
|---|
| 134 | |
|---|
| 135 | define command { |
|---|
| 136 | command_name check_remote_procs_P |
|---|
| 137 | command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs_P -a $ARG1$ $ARG2$ $ARG3$ |
|---|
| 138 | } |
|---|
| 139 | |
|---|
| 140 | define command { |
|---|
| 141 | command_name check_remote_procs_m |
|---|
| 142 | command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs_m -a $ARG1$ $ARG2$ $ARG3$ |
|---|
| 143 | } |
|---|
| 144 | |
|---|
| 145 | define command { |
|---|
| 146 | command_name check_remote_procs_s |
|---|
| 147 | command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs_s -a $ARG1$ $ARG2$ $ARG3$ |
|---|
| 148 | } |
|---|
| 149 | |
|---|
| 150 | define command { |
|---|
| 151 | command_name check_remote_procs_u |
|---|
| 152 | command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs_u -a $ARG1$ $ARG2$ $ARG3$ |
|---|
| 153 | } |
|---|
| 154 | |
|---|
| 155 | define command { |
|---|
| 156 | command_name check_remote_procs_z |
|---|
| 157 | command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs_z -a $ARG1$ $ARG2$ $ARG3$ |
|---|
| 158 | } |
|---|
| 159 | |
|---|
| 160 | define command { |
|---|
| 161 | command_name check_remote_mysql |
|---|
| 162 | command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_mysql -a $USER3$ $USER4$ |
|---|
| 163 | } |
|---|
| 164 | |
|---|
| 165 | define command { |
|---|
| 166 | command_name check_remote_mysql_slave |
|---|
| 167 | command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_mysql_S -a $USER3$ $USER4$ |
|---|
| 168 | } |
|---|
| [896] | 169 | |
|---|
| 170 | define command { |
|---|
| 171 | command_name check_remote_afs |
|---|
| 172 | command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_afs |
|---|
| 173 | } |
|---|
| 174 | |
|---|
| 175 | define command { |
|---|
| [991] | 176 | command_name check_remote_cron_working |
|---|
| 177 | command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_cron_working |
|---|
| 178 | } |
|---|
| 179 | |
|---|
| 180 | define command { |
|---|
| [896] | 181 | command_name check_scripts_ldap |
|---|
| 182 | command_line $USER1$/check_ldap -H $HOSTADDRESS$ -b dc=scripts,dc=mit,dc=edu |
|---|
| 183 | } |
|---|
| [900] | 184 | |
|---|
| 185 | define command { |
|---|
| 186 | command_name check_svn |
|---|
| 187 | command_line $USER5$/check_svn -H $HOSTNAME$ -T |
|---|
| 188 | } |
|---|