1. 监控 Windows 服务器
1. 监控内容
windows 服务器的内部参数包括以下
a. 内存使用状况
b. CPU 负载
c. 磁盘使用状况
d. 服务状态
e. 运行的进程
2. 监控原理
在 windows 服务器内安装 NSClient++的监控引擎,nagios 服务器通过 check_nt 来获取
监控数据
3.配置步骤
a.修改启动参数
b.windows 服务器安装监控引擎
c.在 Nagios 服务器内建立监控主机和监控服务配置
d.重新启动 Nagios 服务
4.确认已经配置是否存在
2. 在/usr/local/nagios/etc/objects/commands.cfg 中是否有以下内容(允许使用
check_nt 来监控 windows 服务)
1. # 'check_nt' command definition
2. define command{
3. command_name check_nt
4. command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $AR
G2$
5. }
在/usr/local/nagios/etc/object/templates.cfg 中是否有以下内容(这个用于未来添加新
主机的时候的范例)
1. define host{
2. name windows-server ; The name of this host template
3. use generic-host ; Inherit default values from th
e generic-host template
4. check_period 24x7 ; By default, Windows servers ar
e monitored round the clock
5. check_interval 5 ; Actively check the server ever
y 5 minutes
6. retry_interval 1 ; Schedule host check retries at
1 minute intervals
7. max_check_attempts 10 ; Check each server 10 times (ma
x)
8. check_command check-host-alive ; Default command to che
ck if servers are "alive"
9. notification_period 24x7 ; Send notification out at any t
ime - day or night
10. notification_interval 30 ; Resend notifications every 30
minutes
11. notification_options d,r ; Only send notifications for s
pecific host states
12. contact_groups admins ; Notifications get sent to the
admins by default
13. hostgroups windows-servers ; Host groups that Windows serv
ers should be a member of
14. register 0 ; DONT REGISTER THIS - ITS JUST
A TEMPLATE
15. }