type StatusDataWriter {
%attribute string "status_path",
- %attribute string "objects_path"
+ %attribute string "objects_path",
+ %attribute number "update_interval"
}
type ExternalCommandListener {
DynamicObject::Start();
m_StatusTimer = make_shared<Timer>();
- m_StatusTimer->SetInterval(15);
+ m_StatusTimer->SetInterval(GetUpdateInterval());
m_StatusTimer->OnTimerExpired.connect(boost::bind(&StatusDataWriter::StatusTimerHandler, this));
m_StatusTimer->Start();
m_StatusTimer->Reschedule(0);
[config] String objects_path {
default {{{ return Application::GetLocalStateDir() + "/cache/icinga2/objects.cache"; }}}
};
+ [config] double update_interval {
+ default {{{ return 15; }}}
+ };
};
}
object StatusDataWriter "status" {
status\_path = "/var/cache/icinga2/status.dat",
- objects\_path = "/var/cache/icinga2/objects.path"
+ objects\_path = "/var/cache/icinga2/objects.path",
+ update\_interval = 30s
}
Attributes:
----------------|----------------
status\_path |**Optional.** Path to the status.dat file. Defaults to IcingaLocalStateDir + "/cache/icinga2/status.dat".
objects\_path |**Optional.** Path to the objects.cache file. Defaults to IcingaLocalStateDir + "/cache/icinga2/objects.cache".
+ update\_interval|**Optional.** The interval in which the status files are updated. Defaults to 15 seconds.
### <a id="objecttype-externalcommandlistener"></a> ExternalCommandListener