10.5 监控方法
################################################################
define service{
use generic-service
host_name A
service_description load
check_command check_nrpe!check_load
}
就是多加一个check_nrpe
11、监控WIN
安装 NSClient++
双击安装再启动。
allowed_hosts允许连接的IP
防火墙开端口12489,你也可以换成别的
监控:在nagios.cfg里cfg_dir去掉windods.cfg的注释。
更改IP 就可以进行监控了。
里面的内容跟其它的差不多,可以自行添加。
总结:nagios 总体安装比较简单。特别是3.X 更加人性化。部署起来也没有2.X麻烦,只要安装过2.X的再安装3.X更加速度~
默认的邮箱也是自带的,不需要再配置sendmail。
PNP的安装还没有完成呢。等完成了我再写。
大伙可能会遇到一个很麻烦的问题。错误如下:
CHECK_NRPE: Error - Could not complete SSL handshake
看官网FAQ 就知道。有如下一段:
Title: Debugging "CHECK_NRPE: Error - Could not complete SSL handshake" errors
FAQ ID: F0191
Submitted By: Greg Haygood, Ethan Galstad and Others
Last Updated: 11/03/2004
Description: When attempting to use the check_nrpe plugin, the following error message is printed:
CHECK_NRPE: Error - Could not complete SSL handshake
Solution: This error message could be due to several problems:
* Different versions. Make sure you are using the same version of the check_nrpe plugin and the NRPE daemon. Newer
versions of NRPE are usually not backward compatible with older versions.
* SSL is disabled. Make sure both the NRPE daemon and the check_nrpe plugin were compiled with SSL support and that
neither are being run without SSL support (using command line switches).
* Incorrect file permissions. Make sure the NRPE config file (nrpe.cfg) is readable by the user (i.e. nagios) that
executes the NRPE binary from inetd/xinetd.
* Pseudo-random device files are not readable. Greg Haygood noted the following... "After wringing my hair out and
digging around with truss, I figured out the problem on my Solaris 8 boxen. The files /devices/pseudo/random* (linked through
/dev/*random, and provided by Sun patch 112438) were not readable by the nagios user I use to launch NRPE. Making the
character devices world-readable solved it."
* Unallowed address. If you're running the NRPE daemon under xinetd, make sure that you have a line in the xinetd config
file that say "only_from = xxx.xxx.xxx.xxx", where xxx.xxx.xxx.xxx is the IP address that you're connected to the NRPE daemon
from.
Dave van Nierop added that "Fortunately, for HPUX 11.i (11.11) and later Nagios users, HP now supports /dev/random and
/dev/urandom via a kernel loadable module. Prior to running the NRPE 2.0 configure script, you will need to download this
program from .
Installation does require a server reboot. For detailed information, consult
也就是有5点需要注意的。
石头大哥([url]http://www.itnms.net/discuz/[/url])的翻译如下:
简单说一下,大概的内容,不是严格翻译。
1. 确认check_nrpe 和 nrpe daemon的版本一定要一致。
2. 确认 check_nrpe和nrpe deamon端同时启用或者禁用ssl支持。
3. 确认nrep.cfg可以被nrpe(或者nagios,反正是执行nrep或者xinetd/inetd程序的)用户正常读取。
4. 有关伪随机设备的问题。这个只会在solaris 8上出现,需要一个补丁Sun patch 112438。
5. 确定nagios主机在xinetd的 only_from中,如果没有使用xinetd,则要确认nrpe.cfg中的配置。
另外,赠送l两个,
1. 检查一下你的Windows或者Linux自带的防火墙,是否把端口给filter掉了。
2. 把nrpe的的log打开,可以发现更多有用的信息。