What does retention.dat file do?

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
Shawn L
Posts: 14
Joined: Wed Mar 23, 2016 3:42 pm

What does retention.dat file do?

Post by Shawn L »

Hi,

I have a question regarding retention.dat file. I read the Main Configuration File Options web page about retention. For my understanding, once I stopped Nagios, the info about all hosts and services will be written into retention.dat, and once Nagios is started again, Nagios will read retention.dat for the info. So, I assume after I stopped Nagios, I could modify retention.dat file manually. For example, I stopped nagios first, then I modified the retention.dat and set notifications_enabled to 0 for host_1, then I started Nagios. At this time, I think the notification of the host_1 should be disabled. Am I wrong about this?

Thanks.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: What does retention.dat file do?

Post by tmcdonald »

This article is a great write-up on the matter:

http://www.semintelligent.com/blog/arti ... attributes

Basically, you can edit the retention.dat file but you need to make sure you also edit the modified_attributes= setting as well. I just tested this on Core 4.1.1 and it worked with the notifications setting just as expected.
Former Nagios employee
Locked