Page 1 of 1

Questions regarding altering retention.dat file

Posted: Fri Feb 28, 2020 10:07 am
by akripo
Hello everyone!

I have a nagios core 4.1.1 installation and I had an incident, corrupting the retention.dat file.

I have made a notifier that uses the $LASTSERVICEPROBLEMID$ and $SERVICEPROBLEMID$ macros and uses them as an index on the issue tracking system.

After the reconstruction of the retention.dat file the macros values started counting from zero and now I have serious conflicts with existing IDs..

Please could you advise if it is possible to manually alter the values of these macros on the retention.dat , by placing higher random values for each of the services without causing issues on the nagios monitoring functionality? I was thinking of just adding on all the IDs a high number, lets say a +1.000.000 .

Thank you!

Re: Questions regarding altering retention.dat file

Posted: Fri Feb 28, 2020 3:32 pm
by scottwilkerson
First you must stop the nagios service

then if you edit the retention.dat file, right at the top you can change it in this section

Code: Select all

program {
...
next_problem_id=1000000
...
}
then start nagios

this won't fix the ones that have already been created, but will for new problems

Re: Questions regarding altering retention.dat file

Posted: Sun Mar 01, 2020 3:26 am
by akripo
Thank you very much Scott !

Re: Questions regarding altering retention.dat file

Posted: Mon Mar 02, 2020 7:57 am
by scottwilkerson
akripo wrote:Thank you very much Scott !
glad to help!