Page 1 of 1

Issue after using the Renaming tool

Posted: Thu Feb 20, 2014 1:56 pm
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

Re: Issue after using the Renaming tool

Posted: Thu Feb 20, 2014 3:09 pm
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?

Re: Issue after using the Renaming tool

Posted: Mon Feb 24, 2014 3:38 pm
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

Re: Issue after using the Renaming tool

Posted: Mon Feb 24, 2014 5:31 pm
by lmiltchev
Can you elaborate on this?

Re: Issue after using the Renaming tool

Posted: Tue Feb 25, 2014 9:01 am
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.

Re: Issue after using the Renaming tool

Posted: Tue Feb 25, 2014 2:24 pm
by slansing
Ahh, where were they residing?