Issue after using the Renaming tool

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rdhall01
Posts: 87
Joined: Wed Nov 09, 2011 9:53 am

Issue after using the Renaming tool

Post by rdhall01 »

I recently used the renaming tool on a groups of servers, and now the servers show in the gui as the old name and the new name. I looked in the following directories for the old host names:
/usr/local/nagios/etc/hosts/
ls |grep hostname

/usr/local/nagios/etc/services/
ls |grep hostname

none of them appear, so I then went to the scripts directory to run the following:

./nagiosql_delete_host.php --host=hostname_of_server and get the following back
Unable find host in nagiosql database

./nagiosql_delete_service.php --config=hostname_of_server
Unable find services in nagiosql database.

Im not real sure how to proceede from here, but I also tried the FAQ doc
http://support.nagios.com/wiki/index.ph ... t_Hosts.29

and that didnt help either

Any additional trouble shooting steps to resolve this would be greatly appreciated
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Issue after using the Renaming tool

Post by lmiltchev »

What is the version of Nagios XI that you are currently using? To clarify:

You have several hosts, for example:

Code: Select all

OLD_HOST_1
OLD_HOST_2
OLD_HOST_3
You want to rename them, so you go to:

Code: Select all

CCM->Tools->Renaming Tool->Hosts->select the 3 hosts->Next->Enter the new names & aliases:

Code: Select all

NEW_HOST_1
NEW_HOST_2
NEW_HOST_3
Then you go back to the GUI and see:

Code: Select all

OLD_HOST_1
OLD_HOST_2
OLD_HOST_3
NEW_HOST_1
NEW_HOST_2
NEW_HOST_3
Is this correct?
Be sure to check out our Knowledgebase for helpful articles and solutions!
rdhall01
Posts: 87
Joined: Wed Nov 09, 2011 9:53 am

Re: Issue after using the Renaming tool

Post by rdhall01 »

I found the issue running grep in the host or services directory did not return the names but running up a level with grep -rl did work from a level up
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Issue after using the Renaming tool

Post by lmiltchev »

Can you elaborate on this?
Be sure to check out our Knowledgebase for helpful articles and solutions!
rdhall01
Posts: 87
Joined: Wed Nov 09, 2011 9:53 am

Re: Issue after using the Renaming tool

Post by rdhall01 »

Looking for the renamed hosts / services in there directory doing an ls |grep hostname would not list the files in question, but If I ,oved up a level
/usr/local/nagios/etc/ and did the search from here grep -rl hostname I could find the results. I am not sure why.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Issue after using the Renaming tool

Post by slansing »

Ahh, where were they residing?
Locked