]> git.pld-linux.org Git - projects/nagios-config.git/blame - checkcommands.cfg
- add Id tags and vim modeline syntax
[projects/nagios-config.git] / checkcommands.cfg
CommitLineData
8934a459 1################################################################################
cff08d9a
ER
2# Object config file for Nagios
3# $Id: $
8934a459
ER
4#
5################################################################################
6
7
8################################################################################
9# COMMAND DEFINITIONS
10#
11# SYNTAX:
12#
13# define command {
14# template <templatename>
15# name <objectname>
16# command_name <commandname>
17# command_line <commandline>
18# }
19#
20# WHERE:
21#
22# <templatename> = object name of another command definition that should be
23# used as a template for this definition (optional)
24# <objectname> = object name of command definition, referenced by other
25# command definitions that use it as a template (optional)
26# <commandname> = name of the command, as recognized/used by Nagios
27# <commandline> = command line
28#
29################################################################################
30
31
32
33
34################################################################################
35#
36# SERVICE CHECK COMMANDS
37#
38################################################################################
39
40
41# 'check_tcp' command definition
42define command {
43 command_name check_tcp
44 command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
45}
46
47# 'check_udp' command definition
48define command {
49 command_name check_udp
50 command_line $USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$
51}
52
53# 'check_ftp' command definition
54define command {
55 command_name check_ftp
56 command_line $USER1$/check_ftp -H $HOSTADDRESS$
57}
58
59# 'check_pop' command definition
60define command {
61 command_name check_pop
62 command_line $USER1$/check_pop -H $HOSTADDRESS$
63}
64
65# 'check_smtp' command definition
66define command {
67 command_name check_smtp
68 command_line $USER1$/check_smtp -H $HOSTADDRESS$
69}
70
71# 'check_nntp' command definition
72define command {
73 command_name check_nntp
74 command_line $USER1$/check_nntp -H $HOSTADDRESS$
75}
76
77# 'check_http' command definition
78define command {
79 command_name check_http
80 command_line $USER1$/check_http -H $HOSTADDRESS$
81}
82
83# 'check_http' with port support
84define command {
85 command_name check_http_port
86 command_line $USER1$/check_http -H $HOSTADDRESS$ -p $ARG1$
87}
88
89# check http service with URI
90define command {
91 command_name check_http_uri
92 command_line $USER1$/check_http -I $HOSTADDRESS$ -H $ARG1$ -u $ARG2$
93}
94
95define command {
96 command_name check_http_uri_string
97 command_line $USER1$/check_http -I $HOSTADDRESS$ -H $ARG1$ -p $ARG2$ -u $ARG3$ -s '$ARG4$'
98}
99
100# check http service with URI and expect regex
101define command {
102 command_name check_http_regex
103 command_line $USER1$/check_http -I $HOSTADDRESS$ -H $ARG1$ -u $ARG2$ -r $ARG3$
104}
105
106define command {
107 command_name check_https
108 command_line $USER1$/check_http -I $HOSTADDRESS$ -H $ARG1$ -S
109}
110
111define command {
112 command_name check_https_string
113 command_line $USER1$/check_http -I $HOSTADDRESS$ -H $ARG1$ -S -s '$ARG2$'
114}
115
116# 'check_telnet' command definition
117define command {
118 command_name check_telnet
119 command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p 23
120}
121
122# Generic command to check a device by pinging it
123define command {
124 command_name check_ping
125 command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
126}
127
128# 'check_dns' command definition
129define command {
130 command_name check_dns
131 command_line $USER1$/check_dns -s $HOSTADDRESS$ -H www.yahoo.com
132}
133
134define command {
135 command_name check_dns_custom
136 command_line $USER1$/check_dns -s $HOSTADDRESS$ -H $ARG1$
137}
138
139# check if DNSBL is returning success on test record 127.0.0.2
140define command {
141 command_name check_dnsbl
142 command_line $USER1$/check_dns -s $HOSTADDRESS$ -H 2.0.0.127.$ARG1$ -a 127.0.0.2
143}
144
145# 'check_hpjd' command definition
146define command {
147 command_name check_hpjd
148 command_line $USER1$/check_hpjd -H $HOSTADDRESS$ -C public
149}
150
151# Command used to check disk space usage on local partitions
152define command {
153 command_name check_local_disk
154 command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
155}
156
157# Command used to check the number of currently logged in users on the
158# local machine
159define command {
160 command_name check_local_users
161 command_line $USER1$/check_users -w $ARG1$ -c $ARG2$
162}
163
164# Command to check the number of running processing on the local machine
165define command {
166 command_name check_local_procs
167 command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
168}
169
170# Command to check the load on the local machine
171define command {
172 command_name check_local_load
173 command_line $USER1$/check_load -w $ARG1$ -c $ARG2$
174}
175
176# 'check_ssh' command definition
177define command {
178 command_name check_ssh
179 command_line $USER1$/check_ssh $HOSTADDRESS$
180}
181
182# 'check_mysql' command definition
183# uses $USER3$ and $USER4$ from resources.cfg for authentication
184define command {
185 command_name check_mysql
186 command_line $USER1$/check_mysql -H $ARG1$ -u $USER3$ -p $USER4$ -P$ARG2$
187}
188
189define command {
190 command_name check_mysql-slave
191 command_line $USER1$/check_mysql -H $ARG1$ -u $USER3$ -p $USER4$ -P$ARG2$ -S
192}
193
194# check secure imap
195define command {
196 command_name check_imaps
197 command_line $USER1$/check_simap -H $HOSTADDRESS$
198}
199
200# check for ircd
201define command {
202 command_name check_ircd
203 command_line $USER1$/check_ircd -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$
204}
205
206# check for SNMPd
207# $USER5$ is used for SNMP v1 community string
208define command {
209 command_name check_snmpd
210 command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $USER5$ -o system.sysName.0 -P 1
211}
212
213# check any SNMP OID
214# $ARG1$ OID
215# $ARG2$ Critical Level
216# $ARG3$ warning Level
217define command {
218 command_name check_snmp
219 command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $USER5$ -P 1 -o $ARG1$ -w $ARG2$ -c $ARG3$
220}
221
222# check via SNMP 'proc' directives
223define command {
224 command_name check_snmp_proc
225 command_line $USER1$/check_snmp_proc -H $HOSTADDRESS$ -C $USER5$
226}
227
228# check for disk with nagios-snmp-plugins
229# $USER5$ is used for SNMP v1 community string
230define command {
231 command_name check_snmp_disk
232 command_line $USER1$/check_snmp_disk -H $HOSTADDRESS$ -C $USER5$
233}
234
235# check for spamassassin spamd
236define command {
237 command_name check_spamd
238 command_line $USER1$/check_tcp -H $HOSTNAME$ -p 783 -s 'PING SPAMC/1.0' -e 'PONG'
239}
240
241################################################################################
242#
243# HOST CHECK COMMANDS
244#
245################################################################################
246
247# This command checks to see if a host is "alive" by pinging it
248# The check must result in a 100% packet loss or 5 second (5000ms) round trip
249# average time to produce a critical error.
250# Note: Only one ICMP echo packet is sent (determined by the '-p 1' argument)
251
252# Command to check to see if a host is "alive" (up) by pinging it
253define command {
254 command_name check-host-alive
255 command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 100,99% -c 5000,100% -p 1
256}
257
cff08d9a 258# vim:ts=8:sw=8:syn=nagios
This page took 0.106214 seconds and 4 git commands to generate.