-1

I have to remove custom HTTP check from nagios so commented check_http part in two files namely 1. commands.cfg 2. services.cfg

However when I restarted server, I get following error.

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...

So kindly assist to resolve this issue.

innervoice
  • 21
  • 7

1 Answers1

0

..But you haven't removed it from host configuration. If a service is associated with one or more hosts then you will also need to remove the service from them otherwise you will get similar error.

Error: Service check command 'check_http' specified in service 'HTTP' for host 'localhost' not defined anywhere!

As the error clearly mentions, you have this service configured for host localhost. So check the file (localhost.cfg or hosts.cfg), remove the HTTP service and restart nagios.

Diamond
  • 9,001
  • 3
  • 24
  • 38
  • Thanks... yes you are right...one entry was remained in localhost.cfg and this file was outside of my custom configuration folder. So when I grep http it was giving result in that folder only.. so I cam out of folder and again grep and found entry in localhost.cfg and issue is resolved. thanks a lot. – innervoice Mar 22 '16 at 13:46
  • You are welcome! Glad that it helped. – Diamond Mar 22 '16 at 14:35