Feature commands - time required to change

Hi, I tried to disable “Active checks” and “Passive checks” just to look where this change was getting save.

I noticed that running

icinga2 list object --type host

the values are not set to false.

* enable_active_checks = true
* enable_event_handler = true

Instead I notice that after some time, this file get updated:

cat /var/lib/icinga2/modified-attributes.conf 
var obj = get_object("Host", "matew.pbds.eu")
if (obj) {
        obj.modify_attribute("enable_active_checks", false)
        obj.modify_attribute("enable_passive_checks", false)
        obj.version = 1554803985.936257
}

var obj = get_object("Host", "rio.pbds.eu")
if (obj) {
        obj.modify_attribute("enable_active_checks", true)
        obj.version = 1554799696.447688
}

My question is: how much time does /var/lib/icinga2/modified-attributes.conf require to be updated?

I also noticed that reloading the daemon will update the file right away.

Thank you.

Hi,

that is an internal file for the daemon, and only updated on shutdown/reload/restart. The changes in memory are not dumped immediately on disk, neither is the debug file (used for object list) flushed.

Your source of truth is the REST API which reflects the daemon’s runtime state and modified attributes as well.

Cheers,
Michael