unable to remove the host

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
IT-OPS-SYS
Posts: 184
Joined: Sun Jan 07, 2018 12:56 pm

unable to remove the host

Post by IT-OPS-SYS »

Hi team,

I am unable to remove the host/service from Nagios and while restarting Nagios I am getting the below error.

Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/Common-Windows.cfg', starting on line 147)
Error: Could not find a service matching host name 'malvc2' and description 'Service - Virtual Center' (config file '/usr/local/nagios/etc/servicedependencies.cfg', starting on line 49)
Error: Could not expand master service(s) (config file '/usr/local/nagios/etc/servicedependencies.cfg', starting at line 49)

I deleted the service and when I am trying to delete the host I am getting an error.

Kindly help.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: unable to remove the host

Post by lmiltchev »

Did you remove the host and the service from your service dependency?

CCM > Advanced > Service Dependencies > your dependency > Edit

Can you run the Config FIle Management tool and show the output?

CCM > Tools > Config File Management > Delete Files > Write Configs > Verify Files

Tip: You can temporarily deactivate your service dependency for debugging purposes, and rerun the Config FIle Management tool to see if config errors are gone.
Be sure to check out our Knowledgebase for helpful articles and solutions!
IT-OPS-SYS
Posts: 184
Joined: Sun Jan 07, 2018 12:56 pm

Re: unable to remove the host

Post by IT-OPS-SYS »

what does it do : CCM > Tools > Config File Management > Delete Files > Write Configs > Verify Files

will it delete any of the config file inside the Nagios?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: unable to remove the host

Post by lmiltchev »

Delete Files will delete the "physical" configs on the server, but NOT the configs in the database (CCM). Other words, delete is safe (not permanent), otherwise we wouldn't put it there. If you are concerned though, you could move the files to a different location instead of deleting them, for example:

Code: Select all

mkdir /tmp/hosts /tmp/services
mv /usr/local/nagios/etc/hosts/* /tmp/hosts
mv /usr/local/nagios/etc/services/* /tmp/services
then click on "Write Configs" and "Verify Files"

Write Configs will write them back (create new physical configs on the system).

Verify Files will verify the configuration (check for errors).
Be sure to check out our Knowledgebase for helpful articles and solutions!
IT-OPS-SYS
Posts: 184
Joined: Sun Jan 07, 2018 12:56 pm

Re: unable to remove the host

Post by IT-OPS-SYS »

thanks for the explanation and with this I am able to remove the host from the nagios.

thanks and you can close the thread.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: unable to remove the host

Post by lmiltchev »

I am glad I could help!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked