Incorrect information in objects.cache

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
brian.diedrich
Posts: 21
Joined: Mon Jan 25, 2016 4:45 pm
Location: Phoenix, AZ

Incorrect information in objects.cache

Post by brian.diedrich »

There seems to be some "old" information hanging out on my Nagios XI server somewhere. /usr/local/nagios/var/objects.cache is showing outdated contact information for more than one service check. When I look at the .cfg file directly, or via CCM, the check is showing the correct information. This is causing things like duplicate notifcations to be sent out. How do I clean this up?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Incorrect information in objects.cache

Post by rkennedy »

You may have multiple Nagios processes running, what is the full output of ps -aef | grep 'nagios'? Child processes are fine, but if there are multiple parent processes running that's a concern.

If that's not the case, try navigating to Configure -> Core Config Manager -> Tools -> 'Write Config Files' -> Then, run a 'delete all', 'write configs', and finally a 'verify configuration'. Then, you should be able to Apply Configuration once again from the Core Config Manager. This will rid of any 'ghost' hosts / services or settings.
Former Nagios Employee
brian.diedrich
Posts: 21
Joined: Mon Jan 25, 2016 4:45 pm
Location: Phoenix, AZ

Re: Incorrect information in objects.cache

Post by brian.diedrich »

nagios 2988 1 0 May17 ? 00:00:00 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
nagios 3409 1 0 May17 ? 00:02:33 /usr/local/nagios/bin/npcd -d -f /usr/local/nagios/etc/pnp/npcd.cfg
nagios 30101 1 0 20:46 ? 00:00:34 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 30103 30101 0 20:46 ? 00:00:02 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 30104 30101 0 20:46 ? 00:00:02 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 30105 30101 0 20:46 ? 00:00:02 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 30106 30101 0 20:46 ? 00:00:02 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 30107 30101 0 20:46 ? 00:00:02 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 30108 30101 0 20:46 ? 00:00:02 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 30109 2988 0 20:46 ? 00:00:01 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
nagios 30110 30109 1 20:46 ? 00:00:51 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
nagios 30168 30101 0 20:46 ? 00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 51407 51388 0 22:00 ? 00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php > /usr/local/nagiosxi/var/sysstat.log 2>&1

looks like only child processes to 30101 for nagios.

I will try delete all, write configs, verify configuration and restart and then check the objects.cache and see what is in the objects.cache file afterward
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Incorrect information in objects.cache

Post by Box293 »

Can you check /usr/local/nagios/etc/nagios.cfg to ensure you are looking at the correct objects.cache file.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
brian.diedrich
Posts: 21
Joined: Mon Jan 25, 2016 4:45 pm
Location: Phoenix, AZ

Re: Incorrect information in objects.cache

Post by brian.diedrich »

it is the correct file. The line in nagios.cfg is : object_cache_file=/usr/local/nagios/var/objects.cache.
I did the delete, write, verify, apply configuration and checked the objects.cache file. It is still showing the incorrect contact information, in that it is showing a contact group that shouldn't be there anymore.define service {
host_name CONFUPGRADETST1
service_description Service MySQL
check_period xi_timeperiod_24x7
check_command check_nrpe!service! -n -a MySQL!!!!!!
contacts jira
contact_groups admins <-- this is the outdated information that should no longer be present
notification_period xi_timeperiod_24x7
initial_state o
importance 0
check_interval 5.000000
retry_interval 1.000000
max_check_attempts 5
is_volatile 0
parallelize_check 1
active_checks_enabled 1
passive_checks_enabled 1
obsess 1
event_handler_enabled 1
low_flap_threshold 75.000000
high_flap_threshold 99.000000
flap_detection_enabled 1
flap_detection_options o,c
freshness_threshold 0
check_freshness 0
notification_options r,w,c
notifications_enabled 0
notification_interval 600.000000
first_notification_delay 0.000000
stalking_options n
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
_XIWIZARD nrpe
}
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Incorrect information in objects.cache

Post by Box293 »

If the service does not have any contacts AND contactgroups assigned (including through templates) then it will inherit the contacts AND contactgroups from the host object.

In CCM, the next step is to start at the service.
Check if it has any contacts or contact groups assigned.
Then check what templates are being used.
Then check the templates to see if it has any contacts or contact groups assigned.
Check if the templates are are using any templates and see if it has any contacts or contact groups assigned.
Multiple layers of templates add complexity.
The repeat this process for the host object.

Does this help?

Otherwise we'll need to get your configs and investigate some more. If this is the case, please send an email to [email protected] referencing this forum thread and we'll take it from there. Reply to this thread when you have done this so we can confirm we received the email.

Can you please send us your system profile in that email:

Click the Admin menu
System Config > System Profile
Click the Download Profile button and send us that file
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
brian.diedrich
Posts: 21
Joined: Mon Jan 25, 2016 4:45 pm
Location: Phoenix, AZ

Re: Incorrect information in objects.cache

Post by brian.diedrich »

ah ha. One of the other people on my team added the admin contact group to the generic-service template. I removed it, and the double notifications are gone. Thank you very much!! This can be closed.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Incorrect information in objects.cache

Post by mcapra »

Glad you were able to find a solution! Closing this
Former Nagios employee
https://www.mcapra.com/
Locked