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