Duration resets for all Services with Apply Config

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
SavaSC
Posts: 238
Joined: Wed Feb 23, 2011 4:49 pm

Duration resets for all Services with Apply Config

Post by SavaSC »

Hello,

Recently NagiosXI has started resetting the Duration time for all Services and Hosts when Apply Configuration is pressed. This is making the Duration column completely useless. Every little change (such as to the Description of a host) will cause all of the Duration data for all Services and Hosts to reset.

This hasn't always happened. Is there a setting I can change to keep the Duration data for non-affected Hosts and Services in place on a Apply Configuration?

Version 2014R2.7

Thank you for your help!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Duration resets for all Services with Apply Config

Post by ssax »

Please post the output of this command:

Code: Select all

ls -l /usr/local/nagios/var
SavaSC
Posts: 238
Joined: Wed Feb 23, 2011 4:49 pm

Re: Duration resets for all Services with Apply Config

Post by SavaSC »

Here you go.

Code: Select all

# ls -l /usr/local/nagios/var
total 34648
drwxrwxr-x 2 nagios nagios    65536 Jul  1 23:59 archives
-rw-r--r-- 1 nagios nagios        0 Jul  2 12:17 host-perfdata
-rw-r--r-- 1 nagios nagios      178 Jul  2 10:22 nagios.configtest
-rw-r--r-- 1 nagios nagios        6 Jul  2 10:07 nagios.lock
-rw-r--r-- 1 nagios nagios   577000 Jul  2 12:17 nagios.log
-rw-r--r-- 1 nagios nagios        5 Jun  5 08:34 ndo2db.lock
-rw-r--r-- 1 nagios nagios        0 Jul  2 10:07 ndomod.tmp
srwxr-xr-x 1 nagios nagios        0 Jun  5 08:34 ndo.sock
-rw-r--r-- 1 nagios nagios  2201015 Jun  5 08:34 npcd.log
-rw-r--r-- 1 nagios nagios 10485835 Oct  9  2013 npcd.log.old
-rw-r--r-- 1 nagios nagios  2638701 Jul  2 10:07 objects.cache
-rw-r--r-- 1 nagios nagios  2638701 Jul  2 10:22 objects.precache
-rw-rw-rw- 1 nagios nagios  8488151 Apr  9 04:55 perfdata.log
-rw------- 1 nagios nagios  4148062 Jul  2 12:07 retention.dat
drwxrwsr-x 2 nagios nagcmd     4096 Jul  2 10:07 rw
-rw-r--r-- 1 nagios nagios        0 Jul  2 12:17 service-perfdata
drwxrwxr-x 5 nagios nagios     4096 Mar  1  2011 spool
drwxr-xr-x 2 nagios nagios     4096 Jan  9 15:29 stats
-rw-rw-r-- 1 nagios nagios  4131013 Jul  2 12:17 status.dat
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Duration resets for all Services with Apply Config

Post by abrist »

Is state retention enabled?

Code: Select all

grep retain_state /usr/local/nagios/etc/nagios.cfg
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
SavaSC
Posts: 238
Joined: Wed Feb 23, 2011 4:49 pm

Re: Duration resets for all Services with Apply Config

Post by SavaSC »

Here is the result:

Code: Select all

# grep retain_state /usr/local/nagios/etc/nagios.cfg
retain_state_information=1
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Duration resets for all Services with Apply Config

Post by abrist »

Lets check a few more directives:

Code: Select all

grep "state\|retention\|retain" /usr/local/nagios/etc/nagios.cfg
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
SavaSC
Posts: 238
Joined: Wed Feb 23, 2011 4:49 pm

Re: Duration resets for all Services with Apply Config

Post by SavaSC »

Code: Select all

# grep "state\|retention\|retain" /usr/local/nagios/etc/nagios.cfg
log_initial_states=0
retained_contact_host_attribute_mask=0
retained_contact_service_attribute_mask=0
retained_host_attribute_mask=0
retained_process_host_attribute_mask=0
retained_process_service_attribute_mask=0
retained_service_attribute_mask=0
retain_state_information=1
retention_update_interval=60
soft_state_dependencies=0
state_retention_file=/usr/local/nagios/var/retention.dat
use_retained_program_state=1
use_retained_scheduling_info=1
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Duration resets for all Services with Apply Config

Post by tmcdonald »

Does the duration also reset in the Core interface? You can get to it by visiting http://<server ip>/nagios and using your XI credentials.
Former Nagios employee
SavaSC
Posts: 238
Joined: Wed Feb 23, 2011 4:49 pm

Re: Duration resets for all Services with Apply Config

Post by SavaSC »

tmcdonald wrote:Does the duration also reset in the Core interface? You can get to it by visiting http://<server ip>/nagios and using your XI credentials.
Sorry for the delay.

Yes, it does. I did an Apply Configuration in XI and it affected both XI and Core.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Duration resets for all Services with Apply Config

Post by lmiltchev »

Can you post the entire "nagios.cfg" file?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked