qldb4u 发表于 2016-06-13 20:54

nagiso监控报错,在线求助

执行/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg检查配置时,报这个错错误

Error: Service check command 'check_ping -H ***** -w 3000,80% -c 5000,100%' specified in service '*****' for host '*****' not defined anywhere!

vi commands.cfg

commands.cfg中已经定义了命令:
define command {
      command_name                  check_ping
      command_line                  $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
      register                        1
}

vi nagios.cfg


cfg_dir=/etc/nagiosql/hosts/
cfg_dir=/etc/nagiosql/services/
cfg_file=/etc/nagiosql/commands.cfg
cfg_file=/etc/nagiosql/contactgroups.cfg
cfg_file=/etc/nagiosql/contacts.cfg
cfg_file=/etc/nagiosql/contacttemplates.cfg
cfg_file=/etc/nagiosql/hostdependencies.cfg
cfg_file=/etc/nagiosql/hostescalations.cfg
cfg_file=/etc/nagiosql/hostextinfo.cfg
cfg_file=/etc/nagiosql/hostgroups.cfg
cfg_file=/etc/nagiosql/hosttemplates.cfg
cfg_file=/etc/nagiosql/servicedependencies.cfg
cfg_file=/etc/nagiosql/serviceescalations.cfg
cfg_file=/etc/nagiosql/serviceextinfo.cfg
cfg_file=/etc/nagiosql/servicegroups.cfg
cfg_file=/etc/nagiosql/servicetemplates.cfg
cfg_file=/etc/nagiosql/timeperiods.cfg

nagios.cfg中也定义了commands.cfg的路径


实在是想不到哪里还有错了,请高人指点一下。

ccjsj1 发表于 2016-06-15 12:39

回复 1# qldb4u
可能在services.cfg使用check_ping时有问题?检查一下。(grep check_ping services.cfg)

   

ccjsj1 发表于 2016-06-15 12:40

回复 1# qldb4u
可能在services.cfg使用check_ping时有问题?检查一下。(grep check_ping services.cfg)

   

qldb4u 发表于 2016-06-21 09:32

不使用check_ping服务,直接改用主机的ckeck_alive就正常了,怀疑还是参数引入的问题,不过现在也能用了,谢谢回复
页: [1]
查看完整版本: nagiso监控报错,在线求助