开发者社区> 问答> 正文

Nagios监控windows,安装配置NSClien++后,重启报错 配置报错 

求大神指引。。。

linux还是菜鸟,于是现在玩监控玩出问题了。

大概情况是这样。ubuntu配置好了Nagios,并且可以监控自己。

现在想监控下windows的机子,于是在windows的机子上安装了NSClien++插件,并且配置好了,服务开启,监听正常。

再回到ubuntu的机子上,于是悲剧了。

代码:
/var/log/nagios3# service nagios3 restart  * Restarting nagios3 monitoring daemon nagios3 Nagios Core 3.2.3 Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors Copyright (c) 1999-2009 Ethan Galstad Last Modified: 10-03-2010 License: GPL Website: http://www.nagios.org Reading configuration data...    Read main config file okay... Processing object config file '/etc/nagios3/commands.cfg'... Processing object config directory '/etc/nagios-plugins/config'... Processing object config file '/etc/nagios-plugins/config/users.cfg'... Processing object config file '/etc/nagios-plugins/config/mailq.cfg'... Processing object config file '/etc/nagios-plugins/config/procs.cfg'... Processing object config file '/etc/nagios-plugins/config/disk-smb.cfg'... Processing object config file '/etc/nagios-plugins/config/load.cfg'... Processing object config file '/etc/nagios-plugins/config/dummy.cfg'... Processing object config file '/etc/nagios-plugins/config/radius.cfg'... Processing object config file '/etc/nagios-plugins/config/telnet.cfg'... Processing object config file '/etc/nagios-plugins/config/nt.cfg'... Warning: Duplicate definition found for command 'check_nt' (config file '/etc/nagios-plugins/config/nt.cfg', starting on line 6) Error: Could not add object property in file '/etc/nagios-plugins/config/nt.cfg' on line 7.    Error processing object config files! ***> One or more problems was encountered while processing the config files...      Check your configuration file(s) to ensure that they contain valid      directives and data defintions.  If you are upgrading from a previous      version of Nagios, you should be aware that some variables/definitions      may have been removed or modified in this version.  Make sure to read      the HTML documentation regarding the config files, as well as the      'Whats New' section to find out what has changed.  * errors in config!                                                                          [fail] 根据上面报错,我找到这个文件'/etc/nagios-plugins/config/nt.cfg' 这个文件很是纠结啊,我找网上的照抄无数个版本都不对。 此文件我是这样定义的。
代码:
# 'check_nt' command definition define command {         command_name    check_nt         command_line    /usr/lib/nagios/plugins/check_nt -H '$HOSTADDRESS$' -p 12489 -v '$ARG1$' '$ARG2$' } # 'check_nscp' command definition define command {         command_name    check_nscp         command_line    /usr/lib/nagios/plugins/check_nt -H '$HOSTADDRESS$' -p 12489 -v '$ARG1$' } 实在不清楚哪里错了,这个文件都被我改烂了。 求大神指教!

展开
收起
kun坤 2020-06-04 13:15:51 707 0
1 条回答
写回答
取消 提交回答
  • 我也没搞过,不过看了你的报错,应该是nt.config重复定义了,你以前是不是装过nagios,去看看文档"what new"那块,希望对你有帮助~~

    2020-06-05 13:17:42
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
《云服务器运维之Windows篇》 立即下载
TAKING WINDOWS 10 KERNEL 立即下载
ECS运维指南之Windows系统诊断 立即下载