Nagios Monitors Windows configuration

Source: Internet
Author: User

1. Download and install the Windows plugin Http://sourceforge.net/projects/nscplus/NSCP-0.4.1.73-x64.msi
2. Windows-side configuration Nsclient.ini file
[/modules]
; CHECKWMI = 1 #注释掉该行
[/settings/default]
Allowed hosts = *
;p Assword =
Port = 12489 #该行为手工添加
3. Server-side configuration commands.cfg
Define Command{
Command_name check_nt
Command_line $USER 1$/check_nt-h $HOSTADDRESS $-P 12489-v $ARG 1$ $ARG 2$
}
command-line parameters can be consulted:/usr/lib/nagios/plugins/check_nt-h
4, Configuration Hosts.cfg
Define host {
HOST_NAME AAA
Alias AAA
Address 192.168.1.190
Contact_groups itservices
Check_command check-host-alive
Max_check_attempts 5
Notification_interval 10
Notification_period 24x7
Notification_options D,u,r
}
5, Configuration Services.cfg
#host---AAA
Define Service{
HOST_NAME AAA
Service_description check-host-alive
Check_command check-host-alive
Check_period 24x7
Max_check_attempts 5
Normal_check_interval 3
Retry_check_interval 2
Contact_groups itservices
Notification_interval 10
Notification_period 24x7
Notification_options W,u,c,r
}
Define Service{
HOST_NAME AAA
Service_description CPU Load
Check_command check_nt! Cpuload!-l 5,80,90
Check_period 24x7
Max_check_attempts 5
Normal_check_interval 3
Retry_check_interval 2
Contact_groups itservices
Notification_interval 10
Notification_period 24x7
Notification_options W,u,c,r
}
Define Service{
HOST_NAME AAA
Service_description Memory Usage
Check_command check_nt! Memuse!-w 80-C 90
Check_period 24x7
Max_check_attempts 5
Normal_check_interval 3
Retry_check_interval 2
Contact_groups itservices
Notification_interval 10
Notification_period 24x7
Notification_options W,u,c,r
}
Define Service{
HOST_NAME AAA
Service_description Onlinetime
Check_command check_nt! UPTIME
Check_period 24x7
Max_check_attempts 5
Normal_check_interval 3
Retry_check_interval 2
Contact_groups itservices
Notification_interval 10
Notification_period 24x7
Notification_options W,u,c,r
}
Define Service{
HOST_NAME AAA
Service_description c \ Drive Space
Check_command check_nt! Useddiskspace!-l C-w 80-c 90
Check_period 24x7
Max_check_attempts 5
Normal_check_interval 3
Retry_check_interval 2
Contact_groups itservices
Notification_interval 10
Notification_period 24x7
Notification_options W,u,c,r
}
Define Service{
HOST_NAME AAA
Service_description D:\ Drive Space
Check_command check_nt! Useddiskspace!-l D-w 80-c 90
Check_period 24x7
Max_check_attempts 5
Normal_check_interval 3
Retry_check_interval 2
Contact_groups itservices
Notification_interval 10
Notification_period 24x7
Notification_options W,u,c,r
}
Define Service{
HOST_NAME AAA
Service_description w3svc
Check_command check_nt! servicestate!-d showall-l W3SVC
Check_period 24x7
Max_check_attempts 5
Normal_check_interval 3
Retry_check_interval 2
Contact_groups itservices
Notification_interval 10
Notification_period 24x7
Notification_options W,u,c,r
}
Define Service{
HOST_NAME AAA
Service_description Explorer
Retry_check_interval 2
Contact_groups itservices
Notification_interval 10
Notification_period 24x7
Notification_options W,u,c,r
}
Define Service{
HOST_NAME AAA
Service_description c \ Drive Space
Check_command check_nt! Useddiskspace!-l C-w 80-c 90
Check_period 24x7
Max_check_attempts 5
Normal_check_interval 3
Retry_check_interval 2
Contact_groups itservices
Notification_interval 10
Notification_period 24x7
Notification_options W,u,c,r
}
Define Service{
HOST_NAME AAA
Service_description D:\ Drive Space
Check_command check_nt! Useddiskspace!-l D-w 80-c 90
Check_period 24x7
Max_check_attempts 5
Normal_check_interval 3
Retry_check_interval 2
Contact_groups itservices
Notification_interval 10
Notification_period 24x7
Notification_options W,u,c,r
}
Define Service{
HOST_NAME AAA
Service_description w3svc
Check_command check_nt! servicestate!-d showall-l W3SVC
Check_period 24x7
Max_check_attempts 5
Normal_check_interval 3
Retry_check_interval 2
Contact_groups itservices
Notification_interval 10
Notification_period 24x7
Notification_options W,u,c,r
}
Define Service{
HOST_NAME AAA
Service_description Explorer
Check_command check_nt! procstate!-d showall-l Explorer.exe
Check_period 24x7
Max_check_attempts 5
Normal_check_interval 3
Retry_check_interval 2
Contact_groups itservices
Notification_interval 10
Notification_period 24x7
Notification_options W,u,c,r
}
5. Restart Nagios and httpd services
6. Errors encountered:
Windows Nsclient.log "source\nscp\trunk\include\check_nt/server/protocol.hpp:65:rejected connection from:", Check that the Nsclient.ini and COMMANDS.CFG interfaces are consistent

Nagios Monitors Windows configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.