source: noc/nagios/checkcommands.cfg @ 497

Last change on this file since 497 was 429, checked in by quentin, 17 years ago
Added service checks, including SSH and SSL certificate expiration.
File size: 7.3 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# 'check_http_heartbeat' command definition
78define command{
79       command_name     check_http_heartbeat
80       command_line     $USER1$/check_http -H $HOSTADDRESS$ -u /heartbeat/http -s 1
81       }
82
83# 'check_https_cert' command definition
84define command{
85       command_name     check_https_cert
86       command_line     $USER1$/check_http -H $HOSTADDRESS$ -S -C $ARG1$
87       }
88
89# 'check_local_disk' command definition
90define command{
91        command_name    check_local_disk
92        command_line    $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
93        }
94
95
96# 'check_local_load' command definition
97define command{
98        command_name    check_local_load
99        command_line    $USER1$/check_load -w $ARG1$ -c $ARG2$
100        }
101
102
103# 'check_local_procs' command definition
104define command{
105        command_name    check_local_procs
106        command_line    $USER1$/check_procs -w $ARG1$ -c $ARG2$
107        }
108#command_line    $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
109
110
111# 'check_local_users' command definition
112define command{
113        command_name    check_local_users
114        command_line    $USER1$/check_users -w $ARG1$ -c $ARG2$
115        }
116
117
118# 'check_nntp' command definition
119define command{
120        command_name    check_nntp
121        command_line    $USER1$/check_nntp -H $HOSTADDRESS$
122        }
123
124
125# 'check_ping' command definition
126define command{
127        command_name    check_ping
128        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
129        }
130
131
132# 'check_pop' command definition
133define command{
134        command_name    check_pop
135        command_line    $USER1$/check_pop -H $HOSTADDRESS$
136        }
137
138
139# 'check_smtp' command definition
140define command{
141        command_name    check_smtp
142        command_line    $USER1$/check_smtp -H $HOSTADDRESS$
143        }
144
145
146# 'check_tcp' command definition
147define command{
148        command_name    check_tcp
149        command_line    $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
150        }
151
152
153# 'check_telnet' command definition
154define command{
155        command_name    check_telnet
156        command_line    $USER1$/check_tcp -H $HOSTADDRESS$ -p 23
157        }
158
159
160# 'check_udp' command definition
161define command{
162        command_name    check_udp
163        command_line    $USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$
164        }
165
166
167
168
169################################################################################
170#
171# SAMPLE HOST CHECK COMMANDS
172#
173################################################################################
174
175
176# This command checks to see if a host is "alive" by pinging it
177# The check must result in a 100% packet loss or 5 second (5000ms) round trip
178# average time to produce a critical error.
179# Note: Only one ICMP echo packet is sent (determined by the '-p 1' argument)
180
181# 'check-host-alive' command definition
182#define command{
183#        command_name    check-host-alive
184#        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 1
185#        }
186
187define command{
188        command_name    check-host-alive
189        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 99,99% -c 100,100% -p 1 
190        }
191
192define command {
193        command_name    check_ssh
194        command_line    $USER1$/check_ssh $HOSTADDRESS$
195}
196
197define command {
198        command_name    check_remote_users
199        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_users -a $ARG1$ $ARG2$
200}
201
202define command {
203        command_name    check_remote_load
204        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_load -a $ARG1$ $ARG2$
205}
206
207define command {
208        command_name    check_remote_disk
209        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_disk -a $ARG1$ $ARG2$
210}
211
212define command {
213        command_name    check_remote_disk_p
214        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_disk_p -a $ARG1$ $ARG2$ $ARG3$
215}
216
217define command {
218        command_name    check_remote_procs
219        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs -a $ARG1$ $ARG2$
220}
221
222define command {
223        command_name    check_remote_procs_C
224        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs_C -a $ARG1$ $ARG2$ $ARG3$
225}
226
227define command {
228        command_name    check_remote_procs_P
229        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs_P -a $ARG1$ $ARG2$ $ARG3$
230}
231
232define command {
233        command_name    check_remote_procs_m
234        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs_m -a $ARG1$ $ARG2$ $ARG3$
235}
236
237define command {
238        command_name    check_remote_procs_s
239        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs_s -a $ARG1$ $ARG2$ $ARG3$
240}
241
242define command {
243        command_name    check_remote_procs_u
244        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs_u -a $ARG1$ $ARG2$ $ARG3$
245}
246
247define command {
248        command_name    check_remote_procs_z
249        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_procs_z -a $ARG1$ $ARG2$ $ARG3$
250}
251
252define command {
253        command_name    check_mysql
254        command_line    $USER1$/check_mysql -H $HOSTADDRESS$ -a $USER3$ $USER4$
255}
256
257define command {
258        command_name    check_remote_mysql
259        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_mysql -a $USER3$ $USER4$
260}
261
262define command {
263        command_name    check_remote_mysql_slave
264        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_mysql_S -a $USER3$ $USER4$
265}
Note: See TracBrowser for help on using the repository browser.