Nagios监控Windows Server 2008配置
来源:互联网 发布:樱井知香步兵番号 编辑:程序博客网 时间:2024/06/05 07:25
1.安装NSClient++
访问http://nsclient.org/nscp/下载NSClient++,这里我使用的是NSClient++-0.3.9-x64的msi安装包。下载之后直接安装,过程中会提示输入Nagios监控服务器地址和密码。地址填写正确,密码不用设置。Nagios监控服务器事先在监控Linux服务器时候已经搭建好,以后再和大家分享。
安装如下图所示:
2.配置NSClient++
编辑安装目录下的NES.ini文件,打开NSClient++的端口。方法为找到:
[NSClient]
;port=12489
去掉port前的“;”就可以启用12489端口。
我的是安装在服务器的program files下的NSClient++-Win32-0.3.9目录中。在cmd中执行:
cd C:\Program files\NSClient++-Win32-0.3.5
netstat -an | more
查看12489端口是否正常监听在。
因为安装时候需要的模块已经勾选了,所以配置文件中不用再作设置。否则可以通过去掉每个模块前的;来启用该模块。
到这里即完成了Windows Server 2008上的配置。接下来我们设置Nagios监控服务器。
3.Nagios监控服务器设置
vi /usr/local/nagios/etc/nagios.cfg
搜索找到:
# Definitions for monitoring a Windows machine
# cfg_file=/usr/local/nagios/etc/objects/windows.cfg
将第二行的#去掉打开Nagios监控的Windows模块,然后保存。
接着编辑
# vi /usr/local/nagios/etc/objects/windows.cfg
找到并设置监控的服务器:
define host{
use windows-server ; Inherit default values from a template
host_name winserver ; The name we're giving to this host
alias My Windows Server ; A longer name associated with the host
address 192.168.0.2 ; IP address of the host
}
设置被监控主机名和被监控的Windows服务器地址。
接下来搜索各种监控的服务并设置:
# Create a service for monitoring the version of NSCLient++ that is installed
# Change the host_name to match the name of the host you defined above
define service{
use generic-service
host_name winserver
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}
监控NSClient版本。
# Create a service for monitoring the uptime of the server
# Change the host_name to match the name of the host you defined above
define service{
use generic-service
host_name winserver
service_description Uptime
check_command check_nt!UPTIME
}
监控服务器在线时间。
# Create a service for monitoring CPU load
# Change the host_name to match the name of the host you defined above
define service{
use generic-service
host_name winserver
service_description CPU Load
check_command check_nt!CPULOAD!-l 20,30,50
}
监控服务器CPU负载。
# Create a service for monitoring memory usage
# Change the host_name to match the name of the host you defined above
define service{
use generic-service
host_name winserver
service_description Memory Usage
check_command check_nt!MEMUSE!-w 80 -c 90
}
监控服务器的内存占用。
# Create a service for monitoring C:\ disk usage
# Change the host_name to match the name of the host you defined above
define service{
use generic-service
host_name winserver
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
}
监控系统C盘的磁盘占用。
- Nagios监控Windows Server 2008配置
- nagios配置监控windows配置
- [nagios监控] centos6.2安装配置nagios server
- Nagios监控Windows配置,安装NSClient++
- 实战Nagios NSCA方式监控Linux系统资源使用情况 -- Nagios配置篇 -- Nagios Server端
- nagios 监控windows客户端
- Nagios 监控Windows服务器
- Nagios监控windows服务器
- Nagios 监控 Windows 服务器
- Nagios监控项目配置
- Nagios 配置及监控
- nagios 监控 windows 相关服务
- 关于Nagios监控windows主机
- nagios监控windows配置文件实例
- nagios监控windows主机
- nagios配置监控hadoop日志
- 配置nagios监控oracle,check_oracle_health
- Nagios 监控配置及实战
- 我的产品经理之路1
- java nio 实现文件的读取和输出
- nginx日志解析输出elasticstack
- csdn如何转载别人的文章
- prop和attr的区别
- Nagios监控Windows Server 2008配置
- redis 统一通讯协议 返回结果格式 请求命令格式
- 常用linux指令
- MVC 学习目录
- C++实现动画播放
- Java多态的应用
- React Native开源播放器Video组件(react-native-video)
- Android package属性、package name和Application ID三者的联系及区别
- 网站转安卓APP利器:Website 2 APK Builder