I’m trying to get retention.dat working on nagios 2.0b6, below is my config. The file retention.dat is never created, even if I set the interval to a low value (or even 0, I’ve tried tail -f 'ing the file during a sighup). Any ideas? It’s not likely a permissions problem, I’ve even tried creating the file with 0777 perms, it just never gets populated with data. Am I missing something?
Thanks for the assistance. I know that retention.dat is a generated file, but after never seeing it get created I tried creating a blank retention.dat as 0777 just to make sure that nagios had permissions to write the file. Nagios is set to drop to the ‘nagios’ user and group, and appears to be running correctly as that uid/gid. Here’s an ls of the directories:
/var/spool # ls -la
drwxrwxrwx 2 nagios nagios 512 Jan 3 09:54 nagios
/var/spool/nagios # ls -la
-rw-rw-r-- 1 nagios nagios 784 Dec 29 18:35 comments.dat
-rw-rw-r-- 1 nagios nagios 241 Dec 28 15:21 downtime.dat
prw-rw---- 1 nagios nagios 0 Jan 3 09:54 nagios.cmd
-rw-r–r-- 1 nagios nagios 6 Jan 3 09:54 nagios.lock
-rw-rw-r-- 1 nagios nagios 165973 Jan 3 09:54 objects.cache
-rw-rw-r-- 1 nagios nagios 1294 Jan 3 09:55 perfdata.dat
-rw-rw-r-- 1 nagios nagios 165614 Jan 3 09:55 status.dat
BTW, any ‘persistant’ comments I put on a service do stay there when nagios is reset. It’s just disabled active service checks and disabled service notifications that are forgotten when nagios is sighup’d.
/etc/rc.d/init.d/nagios stop
Now, that you THINK it’s stopped, do a :
ps -ef|grep nagios
You might see several.
So kill them
kill pid
Now do another ps until you have killed all nagios.
Now start nagios again.
/etc/rc.d/init.d/nagios start
I’m saying this because I think you have made changes to your nagios.cfg file, etc, and they have NOT been applied yet, since nagios has NEVER been killed yet. Edited Fri Jan 06 2006, 08:22PM ]
It is being stopped completely (no nagios processes), still the retention.dat file is never created after I restart the process (either manually or via init). I’ve tried retention_update_interval values of 0,3 and 60, and have given plenty (24hrs) of time between each of my tests to insure that all service checks have completed hard.
I haven’t yet found a problem with my above config, so I’m asking anyone running 2.0b6 or later to report if they ever see this file being created. I’m holding off from posting this to the nagios-devel list until I at least see one other person reporting this as a bug.