I have a corrupted retention.dat file so have updated nagios.cfg to use retention2.dat and have restored retention.dat to retention2.dat
Now the scheduled downtime settings are being wiped each time Nagios is restarted with the recurring downtime being resubmitted when the CRON jobs runs after the restart.
Can I restore the previous scheduled downtime settings and also ensure that new scheduled downtime settings are retained after the service restart.
-rw-rw-rw- 1 root root 483 Sep 27 2019 profile.csv
-rw------- 1 nagios nagios 21148201 Aug 26 10:21 retention2.dat
-????????? ? ? ? ? ? retention.dat
drwxrwsr-x 2 nagios nagcmd 4096 Aug 26 09:21 rw
-rw-r--r-- 1 nagios nagios 5030 Aug 26 10:27 service-perfdata
drwxr-xr-x 5 nagios nagios 4096 Sep 27 2019 spool
drwxr-xr-x 2 nagios nagios 4096 Aug 26 10:26 stats
-rw-rw-r-- 1 nagios nagios 21102168 Aug 26 10:27 status.dat
Regards
William Bright
ITSM Consultant
Scheduled downtime being cleared when Nagios Restarts
Re: Scheduled downtime being cleared when Nagios Restarts
Hello @wbright
Thanks for reaching out on the scheduled downtime issue. I tried to dupe the scheduled downtime on my test environment but was not able to replicate the issue.
We want to take a look at your Nagios XI System Profile so we can see what is going on.
To send us your system profile.
Perry
Thanks for reaching out on the scheduled downtime issue. I tried to dupe the scheduled downtime on my test environment but was not able to replicate the issue.
We want to take a look at your Nagios XI System Profile so we can see what is going on.
To send us your system profile.
- Login to the Nagios XI GUI using a web browser.
- Click the "Admin" > "System Profile" Menu
- Click the "Download Profile" button
- Save the profile.zip file and share via private message
Perry
Re: Scheduled downtime being cleared when Nagios Restarts
Hello @wbright
To follow up, we see that retention.dat is also hard coded in other places within the application code (for example; config.inc.php:$cfg['state_retention_file']='/usr/local/nagios/var/retention.dat')
Does not look like renaming it will work, you may want to copy it out instead.
Thanks,
Perry
To follow up, we see that retention.dat is also hard coded in other places within the application code (for example; config.inc.php:$cfg['state_retention_file']='/usr/local/nagios/var/retention.dat')
Does not look like renaming it will work, you may want to copy it out instead.
Thanks,
Perry
Re: Scheduled downtime being cleared when Nagios Restarts
Good afternoon Perry,
Thank you for the information but unfortunately I have been unable to copy, rename or remove the retention.dat file.
It looks like I am going to have to build a new server and restore the nagios backup.
Have a good day
Regards
William Bright
Thank you for the information but unfortunately I have been unable to copy, rename or remove the retention.dat file.
It looks like I am going to have to build a new server and restore the nagios backup.
Have a good day
Regards
William Bright
Re: Scheduled downtime being cleared when Nagios Restarts
Hello William,
Are you able to read the retention.dat? If so you could 'cat' it and redirect to file? (cat /usr/local/nagios/var/retention.dat > /some/file.txt).
Let us know if you need anything further.
Thanks,
Perry
Are you able to read the retention.dat? If so you could 'cat' it and redirect to file? (cat /usr/local/nagios/var/retention.dat > /some/file.txt).
Let us know if you need anything further.
Thanks,
Perry