source: noc/nagios/checkcommands.cfg @ 67

Last change on this file since 67 was 48, checked in by presbrey, 18 years ago
scripts.mit.edu NOC nagios configuration
File size: 6.9 KB
Line 
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
36
37
38
39################################################################################
40#
41# SAMPLE SERVICE CHECK COMMANDS
42#
43# These are some example service check commands.  They may or may not work on
44# your system, as they must be modified for your plugins.  See the HTML
45# documentation on the plugins for examples of how to configure command definitions.
46#
47################################################################################
48
49
50# 'check_dns' command definition
51define command{
52        command_name    check_dns
53        command_line    $USER1$/check_dns -H www.yahoo.com -s $HOSTADDRESS$
54        }
55
56
57# 'check_ftp' command definition
58define command{
59        command_name    check_ftp
60        command_line    $USER1$/check_ftp -H $HOSTADDRESS$
61        }
62
63
64# 'check_hpjd' command definition
65define command{
66        command_name    check_hpjd
67        command_line    $USER1$/check_hpjd -H $HOSTADDRESS$ -C public
68        }
69
70
71# 'check_http' command definition
72define command{
73        command_name    check_http
74        command_line    $USER1$/check_http -H $HOSTADDRESS$
75        }
76
77
78# 'check_local_disk' command definition
79define command{
80        command_name    check_local_disk
81        command_line    $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
82        }
83
84
85# 'check_local_load' command definition
86define command{
87        command_name    check_local_load
88        command_line    $USER1$/check_load -w $ARG1$ -c $ARG2$
89        }
90
91
92# 'check_local_procs' command definition
93define command{
94        command_name    check_local_procs
95        command_line    $USER1$/check_procs -w $ARG1$ -c $ARG2$
96        }
97#command_line    $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
98
99
100# 'check_local_users' command definition
101define command{
102        command_name    check_local_users
103        command_line    $USER1$/check_users -w $ARG1$ -c $ARG2$
104        }
105
106
107# 'check_nntp' command definition
108define command{
109        command_name    check_nntp
110        command_line    $USER1$/check_nntp -H $HOSTADDRESS$
111        }
112
113
114# 'check_ping' command definition
115define command{
116        command_name    check_ping
117        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
118        }
119
120
121# 'check_pop' command definition
122define command{
123        command_name    check_pop
124        command_line    $USER1$/check_pop -H $HOSTADDRESS$
125        }
126
127
128# 'check_smtp' command definition
129define command{
130        command_name    check_smtp
131        command_line    $USER1$/check_smtp -H $HOSTADDRESS$
132        }
133
134
135# 'check_tcp' command definition
136define command{
137        command_name    check_tcp
138        command_line    $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
139        }
140
141
142# 'check_telnet' command definition
143define command{
144        command_name    check_telnet
145        command_line    $USER1$/check_tcp -H $HOSTADDRESS$ -p 23
146        }
147
148
149# 'check_udp' command definition
150define command{
151        command_name    check_udp
152        command_line    $USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$
153        }
154
155
156
157
158################################################################################
159#
160# SAMPLE HOST CHECK COMMANDS
161#
162################################################################################
163
164
165# This command checks to see if a host is "alive" by pinging it
166# The check must result in a 100% packet loss or 5 second (5000ms) round trip
167# average time to produce a critical error.
168# Note: Only one ICMP echo packet is sent (determined by the '-p 1' argument)
169
170# 'check-host-alive' command definition
171#define command{
172#        command_name    check-host-alive
173#        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 1
174#        }
175
176define command{
177        command_name    check-host-alive
178        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 99,99% -c 100,100% -p 1 
179        }
180
181define command {
182        command_name    check_ssh
183        command_line    $USER1$/check_ssh $HOSTADDRESS$
184}
185
186define command {
187        command_name    check_remote_users
188        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_users -a $ARG1$ $ARG2$
189}
190
191define command {
192        command_name    check_remote_load
193        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_load -a $ARG1$ $ARG2$
194}
195
196define command {
197        command_name    check_remote_disk
198        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_disk -a $ARG1$ $ARG2$
199}
200
201define command {
202        command_name    check_remote_disk_p
203        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_disk_p -a $ARG1$ $ARG2$ $ARG3$
204}
205
206define command {
207        command_name    check_remote_procs
208        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs -a $ARG1$ $ARG2$
209}
210
211define command {
212        command_name    check_remote_procs_C
213        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs_C -a $ARG1$ $ARG2$ $ARG3$
214}
215
216define command {
217        command_name    check_remote_procs_P
218        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs_P -a $ARG1$ $ARG2$ $ARG3$
219}
220
221define command {
222        command_name    check_remote_procs_m
223        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs_m -a $ARG1$ $ARG2$ $ARG3$
224}
225
226define command {
227        command_name    check_remote_procs_s
228        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs_s -a $ARG1$ $ARG2$ $ARG3$
229}
230
231define command {
232        command_name    check_remote_procs_u
233        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs_u -a $ARG1$ $ARG2$ $ARG3$
234}
235
236define command {
237        command_name    check_remote_procs_z
238        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs_z -a $ARG1$ $ARG2$ $ARG3$
239}
240
241define command {
242        command_name    check_mysql
243        command_line    $USER1$/check_mysql -H $HOSTADDRESS$ -a $USER3$ $USER4$
244}
245
246define command {
247        command_name    check_remote_mysql
248        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_mysql -a $USER3$ $USER4$
249}
250
251define command {
252        command_name    check_remote_mysql_slave
253        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_mysql_S -a $USER3$ $USER4$
254}
Note: See TracBrowser for help on using the repository browser.