nagios监控不正常

时间:2022-05-01 17:23:58
小弟刚刚开始学习nagios的搭建。初步搭建好后出现一个问题。

nagios监控不正常
监控的是本机。
主要有两个问题
1、check-disk、check-load、total_procs总是报“Connection refused by host ”
2、zombie_procs监控项总是不见。

偶尔会变正常。
nagios监控不正常
但是一刷新就又出问题了。

5 个解决方案

#1


看日志是王道。

#2


引用 1 楼  的回复:
看日志是王道。

[1344823658] SERVICE ALERT: nagios-server;check-disk;CRITICAL;SOFT;1;Connection refused by host
[1344823658] SERVICE ALERT: nagios-server;check-load;CRITICAL;SOFT;1;Connection refused by host
[1344823692] Warning: The check of service 'check-disk' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344823692] Warning: The check of service 'check-load' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344823692] Warning: The check of service 'total_procs' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344823698] SERVICE ALERT: nagios-server;check-load;OK;SOFT;2;OK - load average: 0.09, 0.12, 0.15
[1344823698] SERVICE ALERT: nagios-server;check-disk;OK;SOFT;2;DISK OK - free space: / 77848 MB 
(83% inode=99%): /home 179510 MB (23% inode=99%): /boot 80 MB (87% inode=99%): /dev/shm 2020 MB (100% inode=99%):
[1344823771] Warning: The check of service 'check_tcp 80' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344823872] Warning: The check of service 'check-host-alive' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344823891] Warning: The check of service 'total_procs' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344823898] SERVICE ALERT: nagios-server;total_procs;CRITICAL;HARD;4;Connection refused by host
[1344823992] Warning: The check of service 'check_tcp 80' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824011] Warning: The check of service 'check-host-alive' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824058] SERVICE ALERT: nagios-server;total_procs;WARNING;HARD;4;PROCS WARNING: 211 processes
[1344824352] Warning: The check of service 'zombie_procs' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824358] Warning: Check result queue contained results for service 'zombie_procs' on host 'nagios-server', but the service could not be found!  Perhaps you forgot to define the service in your config files?
[1344824371] Warning: The check of service 'check-disk' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824371] Warning: The check of service 'check-load' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824378] SERVICE ALERT: nagios-server;check-disk;CRITICAL;SOFT;1;Connection refused by host
[1344824378] SERVICE ALERT: nagios-server;check-load;CRITICAL;SOFT;1;Connection refused by host
[1344824412] Warning: The check of service 'check-disk' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824412] Warning: The check of service 'check-load' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824412] Warning: The check of service 'total_procs' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824418] SERVICE ALERT: nagios-server;check-disk;OK;SOFT;2;DISK OK - free space: / 77848 MB (83% inode=99%): /home 179510 MB (23% inode=99%): /boot 80 MB (87% inode=99%): /dev/shm 2020 MB (100% inode=99%):
[1344824418] SERVICE ALERT: nagios-server;check-load;OK;SOFT;2;OK - load average: 0.19, 0.21, 0.18
[1344824491] Warning: The check of service 'check_tcp 80' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824592] Auto-save of retention data completed successfully.
[1344824592] Warning: The check of service 'check-host-alive' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824611] Warning: The check of service 'total_procs' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824618] SERVICE ALERT: nagios-server;total_procs;CRITICAL;HARD;4;Connection refused by host
[1344824712] Warning: The check of service 'check_tcp 80' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824731] Warning: The check of service 'check-host-alive' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824778] SERVICE ALERT: nagios-server;total_procs;WARNING;HARD;4;PROCS WARNING: 214 processes

#3


仔细看看配置使用手册

#4


引用 3 楼  的回复:
仔细看看配置使用手册


我看着手册做的。 nagios监控不正常
但不知道哪错了。

#5


问题解决,原因很狗血。
参考http://bbs.chinaunix.net/thread-3580991-1-1.html

因搭建过程中一直使用service nagios restart重起的服务器。用service nagios stop 后ps命令查看有两个nagios进程一直关不了。随后手动kill。
service nagios start问题解决。

#1


看日志是王道。

#2


引用 1 楼  的回复:
看日志是王道。

[1344823658] SERVICE ALERT: nagios-server;check-disk;CRITICAL;SOFT;1;Connection refused by host
[1344823658] SERVICE ALERT: nagios-server;check-load;CRITICAL;SOFT;1;Connection refused by host
[1344823692] Warning: The check of service 'check-disk' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344823692] Warning: The check of service 'check-load' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344823692] Warning: The check of service 'total_procs' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344823698] SERVICE ALERT: nagios-server;check-load;OK;SOFT;2;OK - load average: 0.09, 0.12, 0.15
[1344823698] SERVICE ALERT: nagios-server;check-disk;OK;SOFT;2;DISK OK - free space: / 77848 MB 
(83% inode=99%): /home 179510 MB (23% inode=99%): /boot 80 MB (87% inode=99%): /dev/shm 2020 MB (100% inode=99%):
[1344823771] Warning: The check of service 'check_tcp 80' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344823872] Warning: The check of service 'check-host-alive' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344823891] Warning: The check of service 'total_procs' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344823898] SERVICE ALERT: nagios-server;total_procs;CRITICAL;HARD;4;Connection refused by host
[1344823992] Warning: The check of service 'check_tcp 80' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824011] Warning: The check of service 'check-host-alive' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824058] SERVICE ALERT: nagios-server;total_procs;WARNING;HARD;4;PROCS WARNING: 211 processes
[1344824352] Warning: The check of service 'zombie_procs' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824358] Warning: Check result queue contained results for service 'zombie_procs' on host 'nagios-server', but the service could not be found!  Perhaps you forgot to define the service in your config files?
[1344824371] Warning: The check of service 'check-disk' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824371] Warning: The check of service 'check-load' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824378] SERVICE ALERT: nagios-server;check-disk;CRITICAL;SOFT;1;Connection refused by host
[1344824378] SERVICE ALERT: nagios-server;check-load;CRITICAL;SOFT;1;Connection refused by host
[1344824412] Warning: The check of service 'check-disk' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824412] Warning: The check of service 'check-load' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824412] Warning: The check of service 'total_procs' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824418] SERVICE ALERT: nagios-server;check-disk;OK;SOFT;2;DISK OK - free space: / 77848 MB (83% inode=99%): /home 179510 MB (23% inode=99%): /boot 80 MB (87% inode=99%): /dev/shm 2020 MB (100% inode=99%):
[1344824418] SERVICE ALERT: nagios-server;check-load;OK;SOFT;2;OK - load average: 0.19, 0.21, 0.18
[1344824491] Warning: The check of service 'check_tcp 80' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824592] Auto-save of retention data completed successfully.
[1344824592] Warning: The check of service 'check-host-alive' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824611] Warning: The check of service 'total_procs' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824618] SERVICE ALERT: nagios-server;total_procs;CRITICAL;HARD;4;Connection refused by host
[1344824712] Warning: The check of service 'check_tcp 80' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824731] Warning: The check of service 'check-host-alive' on host 'nagios-server' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...
[1344824778] SERVICE ALERT: nagios-server;total_procs;WARNING;HARD;4;PROCS WARNING: 214 processes

#3


仔细看看配置使用手册

#4


引用 3 楼  的回复:
仔细看看配置使用手册


我看着手册做的。 nagios监控不正常
但不知道哪错了。

#5


问题解决,原因很狗血。
参考http://bbs.chinaunix.net/thread-3580991-1-1.html

因搭建过程中一直使用service nagios restart重起的服务器。用service nagios stop 后ps命令查看有两个nagios进程一直关不了。随后手动kill。
service nagios start问题解决。