I have installed nagios +plugins+NSCA module on Solaris 10 SPARC (test server) and add a host (windows server 2008 ) to monitor,i definied all services that i need to monitor and use the commands (default) already existing in the "commands.cfg" :
For the Nagios server : localhost
Code: Select all
# 'check_local_disk' command definition
77 define command{
78 command_name check_local_disk
79 command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
80 }
81
82
83 # 'check_local_load' command definition
84 define command{
85 command_name check_local_load
86 command_line $USER1$/check_load -w $ARG1$ -c $ARG2$
87 }
88
89
90 # 'check_local_procs' command definition
91 define command{
92 command_name check_local_procs
93 command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
94 }
95
96
97 # 'check_local_users' command definition
98 define command{
99 command_name check_local_users
100 command_line $USER1$/check_users -w $ARG1$ -c $ARG2$
101 }
102
103
104 # 'check_local_swap' command definition
105 define command{
106 command_name check_local_swap
107 command_line $USER1$/check_swap -w $ARG1$ -c $ARG2$
108 }
Code: Select all
# 'check_nt' command definition
226 define command{
227 command_name check_nt
228 command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
229 }
Code: Select all
define service{
3 name check_NT_SERVICE_eventlog
4 service_description check_NT_SERVICE_eventlog
5 use generic-service
6 host_name win2k8r2
7 check_command check_nt!SERVICESTATE!-d SHOWALL -l eventlog
8 notification_options c,r
9 register 0
10 }
11
12
13 define service{
14 #hostgroup_name Windows_Servers
15 service_description NagiosEventlogService
16 use check_NT_SERVICE_eventlog
17 notification_options w,c,r
18 notifications_enabled 1
19 }
20
21
22 # Charge CPU
23 # CRITICAL si charge > 90% pendant plus de 2 minutes
24
25 define service{
26 name check_NT_CPU
27 service_description check_NT_CPU
28 use generic-service
29 host_name win2k8r2
30 check_command check_nt!CPULOAD!-l 2,90
31 notifications_enabled 1
32 notification_options c,r
33 }
34
35 define service{
36 name check_NT_DISK_C
37 service_description check_NT_DISK_C
38 use generic-service
39 host_name win2k8r2
40 check_command check_nt!USEDDISKSPACE!-l C -c95
41 notification_options c,r
42 notifications_enabled 1
43 #active_checks_enabled 1
define service{
64 name check_NT_MEMUSE
65 service_description check_NT_MEMUSE
66 use generic-service
67 host_name win2k8r2
68 check_command check_nt!MEMUSE! -c90
69 check_period 24x7
70 notification_options c,r
71 notifications_enabled 1
72 register 0
73 }
Things seems ok ,but i have two major problems in the web interface:
-All service have the status (for localhost and win2k8r2): CRITICAL and the Return code error 137 is out of bounds
-I can see only the NagiosEventlogService and check_nt_CPU ,even if i defined as you see bellow memuse,disk etc
Can u help me to resolve this issue please?