nagios监控WIN2003的具体步骤如下:
在我的实验室用nagios来监控SERVER的性能,其中mothership为host,win2003,servers 为RHEL56台。
1.useradd nagios
2.mkdir -v /usr/local/nagios,chown nagios.nagios /usr/local/nagios
3.解压nagios.tar.gz
./configure --prefix=prefix --with-nagios-user=someuser --with-nagios-group=somegroup --with-command-group=cmdgroup
#变量prefix 为安装目录,例如/usr/local/nagios
#变量someuser 为nagios的用户,例如nagios
#变量somegruop 为nagios属于的组,例如nagios
#变量cmdgroup 为nagios命令行属组,例如nagcmd
4.安装
make all
make install
make install-config
make install-init
5.建立HTTP用户验证文件
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagios
#p#
6.修改httpd.conf,加入这样几行
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
< Directory " /usr/local/nagios/sbin" >
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName " Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
< /Directory>
Alias /nagios /usr/local/nagios/share
< Directory " /usr/local/nagios/share" >
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName " Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
< /Directory>
#p#
7.修改CGI验证
cd /usr/local/nagios/etc vi cgi.cfg 修改use_authentication=1,在cgi.cfg中指定user为nagios,并且修改chmod -R 777 /usr/local/nagios/var/rw
8.修改nagios.cfg 取消windows.cfg的注释
9. 配置windows.cfg
host=要监控的主机名,IP,然后可以自己定制服务。具体command可以在command.cfg中找
10 利用/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg 来检查配置,然后service nagios restart ,当然,service httpd restart.
11.client的设置
在WIN2003上安装NSCLIENT++,进入安装目录,nsclient.exe /install ; nsclient.exe SysTray install ; nsclient.exe /start ;
修改NSC.INI文件,取消
FileLogger.dll
CheckSystem.dll
CheckDisk.dll
NSClientListener.dll
NRPEListener.dll
SysTray.dll
CheckEventLog.dll
CheckHelpers.dll
的注释,allow_hosts 设置可以监控的服务器IP,password为通信密码,默认没有
12.检查状态,检查TCP12489端口是否打开
通过上文的十二步,想必大家都学会了nagios监控SERVER的性能WIN2003,希望本文对你们有用!
【编辑推荐】