Case change on host has lead to problems

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
GldRush98
Posts: 259
Joined: Wed May 25, 2011 10:51 am
Location: Springfield, IL
Contact:

Case change on host has lead to problems

Post by GldRush98 »

Former hostname: voc-hyperv1
Current hostname: VOC-hyperv1
Yes, it's a minor change, but it was done to conform with the naming scheme were caps denote production and lower cases denote DR servers.
So this was changed a while ago but there is a mix up now and this has broken things, most importantly performance data is missing from services still associated with the old hostname.
I can not figure out WHERE the old name is coming from.
Config name on services has been updated.
Host does not have an alias or display name set to it.
I have deleted the host and recreated it.
I have deleted the services showing the errant name and recreated them.
And STILL it comes back! I even went as far as grepping the cfg files on the server for the lower case name and it is NOWHERE that I can find.
Capture.PNG
Capture2.PNG
Capture3.PNG
You do not have the required permissions to view the files attached to this post.
Prod XI: Debian 12 - Nagios XI 2026R1.2
Dev XI: Debian 12 - Nagios XI 2026R1.2
User avatar
GldRush98
Posts: 259
Joined: Wed May 25, 2011 10:51 am
Location: Springfield, IL
Contact:

Re: Case change on host has lead to problems

Post by GldRush98 »

Actually, changing the case on services is proving to be problemactic as well.
For example service named:
url content

Change the name to:
Url content

The service is now broken. It shows the old name (url content) the XI gui and it will never perform a check. It sticks at pending state!
This really feels like a bug. Unless changing case of something is not actually supported?
Prod XI: Debian 12 - Nagios XI 2026R1.2
Dev XI: Debian 12 - Nagios XI 2026R1.2
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Case change on host has lead to problems

Post by jbrunkow »

You may want to try rewriting your configuration files to correct the error.
  1. Navigate to Config using the bar on top of XI > click Core Config Manager under Advanced Configuration on the left pane > then click Config File Management under Tools on the left.
  • Click Delete Files. ( Don't worry, we can easily rewrite them. )
  • Click Write Configs.
  • Click Verify Files. If you see any errors, correct them and perform the two previous steps again.
  • Click Restart Nagios Core to apply the configuration.
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!
User avatar
GldRush98
Posts: 259
Joined: Wed May 25, 2011 10:51 am
Location: Springfield, IL
Contact:

Re: Case change on host has lead to problems

Post by GldRush98 »

Yeah, I did that. Made no difference. The configs being written to the actual files all appear with the correct case.
Prod XI: Debian 12 - Nagios XI 2026R1.2
Dev XI: Debian 12 - Nagios XI 2026R1.2
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Case change on host has lead to problems

Post by jbrunkow »

I believe this may actually be a bug in a recent release. People are reporting that objects are replicating instead of being renamed.

We are working to correct the software so that we can deploy a fix soon, but you could also alter the database as a workaround for the time being.

Delete the objects you see from the database using a command like below, but with the names of the objects you want to delete.

Code: Select all

mysql -h 127.0.0.1 -uroot -pnagiosxi nagios -e "delete from nagios_obects where name1 like '%hostname%';"
...or you could truncate the entire table...

Code: Select all

mysql -h 127.0.0.1 -uroot -pnagiosxi nagios -e "truncate table nagios_objects;"
...then Apply Config to write the changes from the database to the configuration.
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!
User avatar
GldRush98
Posts: 259
Joined: Wed May 25, 2011 10:51 am
Location: Springfield, IL
Contact:

Re: Case change on host has lead to problems

Post by GldRush98 »

jbrunkow wrote:I believe this may actually be a bug in a recent release. People are reporting that objects are replicating instead of being renamed.

We are working to correct the software so that we can deploy a fix soon, but you could also alter the database as a workaround for the time being.

Delete the objects you see from the database using a command like below, but with the names of the objects you want to delete.

Code: Select all

mysql -h 127.0.0.1 -uroot -pnagiosxi nagios -e "delete from nagios_obects where name1 like '%hostname%';"
...or you could truncate the entire table...

Code: Select all

mysql -h 127.0.0.1 -uroot -pnagiosxi nagios -e "truncate table nagios_objects;"
...then Apply Config to write the changes from the database to the configuration.
Yes, this looks like a bug to me. Running (you had a minor typo in the table name):

Code: Select all

mysql -h 127.0.0.1 -uroot -pnagiosxi nagios -e "delete from nagios_objects where name1 like '%voc-srv1%';"
And then applying the config cleared up the case confusion! All the services look correct and show under the correct case host now.

edit: And confirming this same method also let me change the case of just a service name correctly as well! The service works correctly after the case change. File that bug report :ugeek:
Prod XI: Debian 12 - Nagios XI 2026R1.2
Dev XI: Debian 12 - Nagios XI 2026R1.2
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Case change on host has lead to problems

Post by jbrunkow »

Great! I'm glad you got it working.

Our developers have been made aware of this problem.

Is it okay if I mark this topic as resolved and lock it 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!
User avatar
GldRush98
Posts: 259
Joined: Wed May 25, 2011 10:51 am
Location: Springfield, IL
Contact:

Re: Case change on host has lead to problems

Post by GldRush98 »

Yup, this will suffice until an update fixes it. Thanks for making the devs aware.
Prod XI: Debian 12 - Nagios XI 2026R1.2
Dev XI: Debian 12 - Nagios XI 2026R1.2
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Case change on host has lead to problems

Post by scottwilkerson »

GldRush98 wrote:Yup, this will suffice until an update fixes it. Thanks for making the devs aware.
Great

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