我必须从 nagios 中删除自定义 HTTP 检查,因此在两个文件中注释了 check_http 部分,即 1.commands.cfg 2.services.cfg
但是,当我重新启动服务器时,出现以下错误。
Checking objects...
Error: Service check command 'check_http' specified in service 'HTTP' for host 'localhost' not defined anywhere!
Checked 225 services.
Checked 66 hosts.
Checked 11 host groups.
Checked 6 service groups.
Checked 16 contacts.
Checked 21 contact groups.
Checked 29 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 66 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 5 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
因此,请协助解决此问题。
..但是您还没有从主机配置中删除它。如果一项服务与一个或多个主机相关联,那么您还需要从它们中删除该服务,否则您将收到类似的错误。
正如错误清楚地提到的那样,您已为 host 配置了此服务
localhost
。因此检查文件(localhost.cfg 或 hosts.cfg),删除 HTTP 服务并重新启动 nagios。