Problem with renaming

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
srrhd
Posts: 131
Joined: Thu May 19, 2011 6:15 am

Problem with renaming

Post by srrhd »

Hi,

I had to rename few hosts and consequently the config name of their services. After applying the configuration, on the "Service Detail" page, all the services appears duplicated, one with the old name and one with the new one.
I tryed to restart the monitoring engine, the performance grapher and the database backend, but nothing helped.

When looking in the configuration part, Hosts and Services only appears with once.

Do you have an idea on what might be the problem and how to fix it ?
Last edited by srrhd on Fri Jun 17, 2011 1:13 am, edited 2 times in total.
Configuration:
Nagios XI 2014R2.5
manually upgraded on 64bits CentOS 6
with nothing extra, no gnome, no proxy, no SSL
Add-ons: Hypermap, Minemap, Ping Action, Traceroute Action, Network Replay, Graph Explorer, Latest Alert
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Problem with renaming

Post by mguthrie »

Changing the "Config Name" directive doesn't necessarily change the host membership, I think it's more of a reference for organization in the config files. Can you access the Core Config Manager->Services, then modify one of the services and double check the Host memberships. You can assign a single service to multiple hosts, and I'm wondering if that's what happened here.
User avatar
srrhd
Posts: 131
Joined: Thu May 19, 2011 6:15 am

Re: Problem with renaming

Post by srrhd »

As i have rename the Hosts first, the host membership for the services were automatically modified. When checking the Service page in the Core Config Manager, they appears to be assign only to one Host.

I looked into the /usr/local/nagios/etc/services/ and i found that the duplicated config files generated by NagiosQL. Can't it be the NagiosQL database that needs a clean up ?
Configuration:
Nagios XI 2014R2.5
manually upgraded on 64bits CentOS 6
with nothing extra, no gnome, no proxy, no SSL
Add-ons: Hypermap, Minemap, Ping Action, Traceroute Action, Network Replay, Graph Explorer, Latest Alert
User avatar
admin
Site Admin
Posts: 256
Joined: Mon Oct 12, 2009 8:21 am

Re: Problem with renaming

Post by admin »

I tried to replicate this by renaming a host, but it appeared to work fine (e.g. the old host didn't appear anywhere). What version of Nagios XI are you running?

Also, when you rename a host, you don't need to rename anything on the services. They are still associated with the same database entry for the host, so the name of the host they're associated with will also get updated.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Ethan Galstad
President
User avatar
srrhd
Posts: 131
Joined: Thu May 19, 2011 6:15 am

Re: Problem with renaming

Post by srrhd »

We use Nagios XI 2011R1.2, manually installed on newly installed 32bits CentOS 5 with nothing extra, no gnome, no proxy, no SSL.

I have rename the services' config name, to help us finding the services in case of any post configuration action.

The problem seems to come from the renaming of the services as they appears twice in the /usr/local/nagios/etc/services/ one with the new config name, one with the old one.

I tryied to removed those Config_Name.cfg and execute /usr/local/nagiosxi/scripts/reconfigure_nagios.sh, but it didn't fix anything. The services still appears duplicated on the "service details" page. One interesting thing is that now when i click "Reconfigure this service" under the Config Tab, the Config and the Performance Graph tabs disappears and i am bringing back to Monitoring Tab. Which seems logic as the config file doesn't exist anymore.

More over if i click on old Host Name and try to see it in Nagios Core i got this message:
It appears as though you do not have permission to view information for this host...
So i tryed to fix permissions files in the admin section, and to restart evrything but nothing helped... :(
Configuration:
Nagios XI 2014R2.5
manually upgraded on 64bits CentOS 6
with nothing extra, no gnome, no proxy, no SSL
Add-ons: Hypermap, Minemap, Ping Action, Traceroute Action, Network Replay, Graph Explorer, Latest Alert
User avatar
srrhd
Posts: 131
Joined: Thu May 19, 2011 6:15 am

Re: Problem with renaming

Post by srrhd »

I have just upgrade to NagiosXI 2011R1.3, the problem is still going on.
Configuration:
Nagios XI 2014R2.5
manually upgraded on 64bits CentOS 6
with nothing extra, no gnome, no proxy, no SSL
Add-ons: Hypermap, Minemap, Ping Action, Traceroute Action, Network Replay, Graph Explorer, Latest Alert
User avatar
srrhd
Posts: 131
Joined: Thu May 19, 2011 6:15 am

Re: Problem with renaming

Post by srrhd »

I tryied to add a new host with an old name and i got these message:
Error while inserting the data into the database:
Duplicate entry 'Syslog-1' for key 2
Configuration:
Nagios XI 2014R2.5
manually upgraded on 64bits CentOS 6
with nothing extra, no gnome, no proxy, no SSL
Add-ons: Hypermap, Minemap, Ping Action, Traceroute Action, Network Replay, Graph Explorer, Latest Alert
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Problem with renaming

Post by nscott »

srrhd,

Do any red flags pop up when you check under Admin > Monitoring Config > Check File Permissions?

Also under the same Monitoring Config > Unconfigured Objects, does that show the items you tried to delete?
Nicholas Scott
Former Nagios employee
User avatar
srrhd
Posts: 131
Joined: Thu May 19, 2011 6:15 am

Re: Problem with renaming

Post by srrhd »

Hi Nicholas,

No for both:
  • * When checking files permissions, no red flags poping-up. Everything appears to be OK.
    * On Unconfigured Objects page, anything is listed.
As there was in the /usr/local/nagios/etc/services/ directory, duplicated config files with new and old service's ConfigName, can't it be a problem with a database ? If i have a good understanding of how it works, the configuration files are used to implement the NagiosQl database no ?

Is there a way, to delete those services using a script or a shell command ?

Hoping it will help you understand what's hapening, i attache a screenshot showing the Service Details page.

Thanks,

Aurélien.
You do not have the required permissions to view the files attached to this post.
Configuration:
Nagios XI 2014R2.5
manually upgraded on 64bits CentOS 6
with nothing extra, no gnome, no proxy, no SSL
Add-ons: Hypermap, Minemap, Ping Action, Traceroute Action, Network Replay, Graph Explorer, Latest Alert
User avatar
srrhd
Posts: 131
Joined: Thu May 19, 2011 6:15 am

Re: Problem with renaming

Post by srrhd »

Hi,

Trying to find clues, i run the following command from /usr/local/:
  • grep -r Old_Host_Name *
It appears that /usr/local/nagios/var/retention.dat got many parts of those old configuration (but nothing of the new). Can it be the problem's cause ? What is the purpose of retention.dat ?
  • [root@localhost local]# grep -r Syslog *
    nagios/var/retention.dat:host_name=Syslog
    nagios/var/retention.dat:display_name=Syslog
    nagios/var/retention.dat:host_name=Syslog
    nagios/var/retention.dat:host_name=Syslog
    nagios/var/retention.dat:host_name=Syslog
    nagios/var/retention.dat:host_name=Syslog
    nagios/var/retention.dat:host_name=Syslog
    nagios/var/retention.dat:host_name=Syslog
    nagios/var/retention.dat:host_name=Syslog
    nagios/var/retention.dat:host_name=Syslog
    nagios/var/retention.dat:host_name=Syslog
    nagios/var/retention.dat:host_name=Syslog
    nagios/var/retention.dat:host_name=Syslog
    nagios/var/retention.dat:host_name=Syslog
Configuration:
Nagios XI 2014R2.5
manually upgraded on 64bits CentOS 6
with nothing extra, no gnome, no proxy, no SSL
Add-ons: Hypermap, Minemap, Ping Action, Traceroute Action, Network Replay, Graph Explorer, Latest Alert
Locked