装nagios遇到这样的问题:定义被监控对象的文件应该放在哪里呢?我的nagios装在/usr/local/nagios/, /usr/local/nagios/etc/下有cgi.cfg, nagios.cfg, resource.cfg, htpasswd这样几个文件,是不是应该建立一个services.cfg,然后在里面按如下定义呢:
define service{
use generic-service ; Name of service template to use
host_name 192.168.8.216
service_description zombie procs
is_volatile 0
check_period 24x7
max_check_attempts 4
normal_check_interval 5
retry_check_interval 1
contact_groups admins
notification_options w,u,c,r
notification_interval 960
notification_period 24x7
check_command check_nrpe!check_zombie_procs
}
另外,在被监控机上:/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1出现如下错误:
CHECK_NRPE: Error - Could not complete SSL handshake.
而/usr/local/nagios/libexec/check_nrpe -H 192.168.224.43 (监控机ip),又出现如下错误:
Connection refused by host.双方的防火墙我都关了啊,端口5666也是启动的。被监控机的/usr/local/nagios/etc/nrpe.cfg配置如下(192.168.224.43为监控机ip):allowed_hosts=127.0.0.1,192.168.224.43