mirror of https://github.com/Icinga/icinga2.git
parent
aa4c2b9542
commit
02e0933e7c
|
@ -19,7 +19,8 @@
|
|||
|
||||
type StatusDataWriter {
|
||||
%attribute string "status_path",
|
||||
%attribute string "objects_path"
|
||||
%attribute string "objects_path",
|
||||
%attribute number "update_interval"
|
||||
}
|
||||
|
||||
type ExternalCommandListener {
|
||||
|
|
|
@ -56,7 +56,7 @@ void StatusDataWriter::Start(void)
|
|||
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);
|
||||
|
|
|
@ -12,6 +12,9 @@ class StatusDataWriter : DynamicObject
|
|||
[config] String objects_path {
|
||||
default {{{ return Application::GetLocalStateDir() + "/cache/icinga2/objects.cache"; }}}
|
||||
};
|
||||
[config] double update_interval {
|
||||
default {{{ return 15; }}}
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -719,7 +719,8 @@ Example:
|
|||
|
||||
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:
|
||||
|
@ -728,6 +729,7 @@ 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
|
||||
|
||||
|
|
Loading…
Reference in New Issue