Host cannot be deleted using this method

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
seaward1983
Posts: 69
Joined: Wed Jul 17, 2019 2:09 pm

Host cannot be deleted using this method

Post by seaward1983 »

OS - RHEL 7
Nagios XI 5.7.2

Have removed host out of hosts and services. But they remain. I get this when trying to delete them out of the dashboard

Could not find a unique id for this host
Host cannot be deleted using this method

I've seen a LOT of responses on this - but so far nothing has worked

Manually went to /usr/local/nagios/etc/services and /usr/local/nagios/etc/hosts - there are no config files there
Ran this command /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg - no errors or warnings
Went into config file management - delete files, write configs - restart Nagios Core - no errors
Ran this command /usr/local/nagiosxi/scripts/repairmysql.sh nagios - no change
Ran this command mysqlcheck -f -r -u root -p --database nagios - no change
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Host cannot be deleted using this method

Post by jbrunkow »

Can you try deleting the Host in the Core Configuration Manager instead of the dashboard?

If a host or service exists in Nagios, it should have a corresponding configuration file in one of the two folders.

Code: Select all

/usr/local/nagios/etc/hosts
/usr/local/nagios/etc/services
Is it possible that this host or service was renamed at some point? It could be that the configuration file is not named what you would expect it to be.

Code: Select all

cat /usr/local/nagios/etc/hosts/* | grep host_name
cat /usr/local/nagios/etc/services/* | grep host_name
It never hurts to send ( PM ) us a profile either! We can find lots of information about your system in there. You can download the profile by navigating to System Profile under System Config on the left pane > and clicking the Download Profile button on that page.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
seaward1983
Posts: 69
Joined: Wed Jul 17, 2019 2:09 pm

Re: Host cannot be deleted using this method

Post by seaward1983 »

We ended up hacking the database. I think we're just going to have to restore from database.
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Host cannot be deleted using this method

Post by jbrunkow »

Yes, if you have the skill to do it that way, it is probably the best method.

Thankyou for letting me know. May I lock this thread for editing?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
seaward1983
Posts: 69
Joined: Wed Jul 17, 2019 2:09 pm

Re: Host cannot be deleted using this method

Post by seaward1983 »

yes
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Host cannot be deleted using this method

Post by scottwilkerson »

seaward1983 wrote:yes
Great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked