Nagios显示服务已closures,但正在主机上运行

我刚刚在centos 7环境中安装了Nagios。 它工作得很好,但我有一个小问题。

我所有的系统都显示为在线,但这些系统上的某些服务显示为不运行,但是当我查看正在运行的系统时。 见下文。

Nagios视图

代码为windows.cfg文件windows.cfg

谢谢您的帮助。 让我知道如果有什么你需要的。

编辑:

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

 [root@localhost ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg Nagios Core 4.1.1 Copyright (c) 2009-present Nagios Core Development Team and Community Contributors Copyright (c) 1999-2009 Ethan Galstad Last Modified: 08-19-2015 License: GPL Website: https://www.nagios.org Reading configuration data... Read main config file okay... Read object config files okay... Running pre-flight check on configuration data... Checking objects... Checked 50 services. Checked 5 hosts. Checked 2 host groups. Checked 0 service groups. Checked 1 contacts. Checked 1 contact groups. Checked 24 commands. Checked 5 time periods. Checked 0 host escalations. Checked 0 service escalations. Checking for circular paths... Checked 5 hosts Checked 0 service dependencies Checked 0 host dependencies Checked 5 timeperiods Checking global event handlers... Checking obsessive compulsive processor commands... Checking misc settings... Total Warnings: 0 Total Errors: 0 Things look okay - No serious problems were detected during the pre-flight check [root@localhost ~]# 

nsclient.ini : nsclient.ini

看来,一切都没有注释。

看来,configuration服务的方式不起作用。 nsclient无法按照configurationfind服务(按名称)。

例如,在您的windows.cfg中检查dns服务可用性的以下部分无法find名为DNS的服务。

 #monitor DNS alert if not running define service{ use generic-service host_name IYS-ROA-AD01 service_description DNS check_command check_nt!PROCSTATE!-d SHOWALL -l DNS } 

尝试将DNS更改为dns.exe并重新启动nagios。

您可以尝试将EXPLORER更改为explorer.exe 。 对于其他进程,您需要find确切的服务名称(可以使用tasklist | find -i "string" )。

最后但并非最不重要的,试着从基于check_nt的检查移动到更新更好的check_nrpe