-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.cfg
41 lines (34 loc) · 1.44 KB
/
example.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#example of what needs to be included into commands.cfg and what ever other cfg files are present
#Something like the below needs to be added into the commands.cfg file.
define command {
command_name ifcheck
command_line /usr/local/libexec/ifcheck -H $HOSTADDRESS$ -C $_HOSTSNMPREAD$ -k $ARG1$
}
define command {
command_name ifcheck_descr
command_line /usr/local/libexec/ifcheck -H $HOSTADDRESS$ -C $_HOSTSNMPREAD$ -d $ARG1$
}
define command {
command_name ifcheck_noflap
command_line /usr/local/libexec/ifcheck -H $HOSTADDRESS$ -C $_HOSTSNMPREAD$ -k $ARG1$ -S
}
#Then in whatever other cfg file holds the service definitions ( something like interfaces.cfg as referenced by the main nagios.cfg)
define service{
service_description Link-to-something
use Service-Default
host_name Switch1
check_command ifcheck!10101
}
define service{
service_description Link-Gi0/1
use Service-Default
host_name Switch1
check_command ifcheck_descr!GigabitEthernet0/1
}
define service{
service_description ISDN-Link
use Service-Default
host_name SomeAwfulVoiceGateway
check_command ifcheck_noflap!1079772160
}
#Which assumes the use of a service template called 'Service-Default'.