2012R1.0 needs fix for "Undefined index: uid"

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: 2012R1.0 needs fix for "Undefined index: uid"

Post by paul.jobb »

We do have our mysql server offloaded to a separate server, our nagios server did have mysql running on it initially and it was still running( shut off now) I'm wondering if the write config function in the new ccm was using the local copy in place of the offloaded db??? yesterday I did rerun applyconfig from the command line and then had to delete the 1000 or so hosts with the later time stamp and restart nagios, its fine now.

can I email you the running config instead, I don't really want to put it on the forum.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: 2012R1.0 needs fix for "Undefined index: uid"

Post by mguthrie »

Are you still experiencing the really long restart times?

Can you post the output from the following command?

Code: Select all

ll /usr/local/nagios/var/retention.dat
If you haven't already you can email the config snapshot to [email protected].
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: 2012R1.0 needs fix for "Undefined index: uid"

Post by paul.jobb »

-rw------- 1 nagios users 24233807 Dec 18 10:05 /usr/local/nagios/var/retention.dat

Yeah the restarts seem to take a while, it appears that gearman is running and processing the checks during that time however so I have never really concerned myself with it. My biggest worry about the apply taking so long is the possibility of it timing out and leaving our configuration files in an inconsistent state.... I noted in the database that the last update time is saved with the record, is there anyway to have an option in apply config that would do an incremental update option(i.e. only write files for those records that have changed)????

One thing to note is that when I actually do a system reboot nagios starts up quick and all the checkmarks are green, but I have to actually restart the nagios services after that because the hosts load but they show up in the interface as grey instead of green(i.e. notifications disabled)
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: 2012R1.0 needs fix for "Undefined index: uid"

Post by mguthrie »

is there anyway to have an option in apply config that would do an incremental update option(i.e. only write files for those records that have changed)????
I tinkered with this about a month ago, and the idea of it works really well until an object gets renamed, then everything needs to get updated in order for the config to work correctly. We haven't yet devised a good solution to make sure we always catch if an object gets renamed, so at the moment we haven't implemented this.
One thing to note is that when I actually do a system reboot nagios starts up quick and all the checkmarks are green, but I have to actually restart the nagios services after that because the hosts load but they show up in the interface as grey instead of green(i.e. notifications disabled)
That is unusual. You might try deleting the retention.dat file one time and seeing if that clears the issue. Note that this will put all of your objects in a pending state until the new status is determined for all hosts and services.
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: 2012R1.0 needs fix for "Undefined index: uid"

Post by paul.jobb »

I do have objects.cache and status.dat on a ramdisk, therefore a reboot destroys those files, would that possibly create an issue with retention.dat?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: 2012R1.0 needs fix for "Undefined index: uid"

Post by scottwilkerson »

paul.jobb wrote:I do have objects.cache and status.dat on a ramdisk, therefore a reboot destroys those files, would that possibly create an issue with retention.dat?
It shouldn't, but the retention.dat if exists is loaded on nagios restart.

We can force a state reset by stopping nagios removing retention.dat and then restarting nagios.

As mguthrie mentioned
mguthrie wrote:Note that this will put all of your objects in a pending state until the new status is determined for all hosts and services.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: 2012R1.0 needs fix for "Undefined index: uid"

Post by paul.jobb »

yes that will be my next step.

I had what seemed to be some erroneous settings in my /etc/sysctl.conf file which I have reset and matched these settings on my mysql server also

kernel.msgmnb = 131072000
#kernel.msgmnb = 4294967295
kernel.msgmax = 131072000
#kernel.msgmax = 4294967295
kernel.shmmax = 4294967295
kernel.shmall = 268435456
kernel.msgmni = 256000
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: 2012R1.0 needs fix for "Undefined index: uid"

Post by lmiltchev »

Did you try stopping nagios, removing retention.dat and then restarting nagios? Is the issue resolved?
Be sure to check out our Knowledgebase for helpful articles and solutions!
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: 2012R1.0 needs fix for "Undefined index: uid"

Post by paul.jobb »

Reading the nagiosql forum I kind of get them impression with the latest release(3.2) that it only does write out the host/service records that change???
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: 2012R1.0 needs fix for "Undefined index: uid"

Post by slansing »

Have you tried as Ludmil suggested? Stopping naigos then removing the retetention.dat file?
Locked