Questions regarding altering retention.dat file

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
akripo
Posts: 2
Joined: Mon Sep 21, 2015 2:27 pm

Questions regarding altering retention.dat file

Post 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!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Questions regarding altering retention.dat file

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
akripo
Posts: 2
Joined: Mon Sep 21, 2015 2:27 pm

Re: Questions regarding altering retention.dat file

Post by akripo »

Thank you very much Scott !
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Questions regarding altering retention.dat file

Post by scottwilkerson »

akripo wrote:Thank you very much Scott !
glad to help!
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked