mirror of https://github.com/Icinga/icinga2.git
parent
47479ac4de
commit
b5dbc66b22
|
@ -586,6 +586,11 @@ Configuration Attributes:
|
||||||
The `/etc/icinga2/conf.d/timeperiods.conf` file is usually used to define
|
The `/etc/icinga2/conf.d/timeperiods.conf` file is usually used to define
|
||||||
timeperiods including this one.
|
timeperiods including this one.
|
||||||
|
|
||||||
|
Runtime Attributes:
|
||||||
|
|
||||||
|
Name | Type | Description
|
||||||
|
--------------------------|---------------|-----------------
|
||||||
|
is\_insidek | Boolean | Whether we're currently inside this timeperiod.
|
||||||
|
|
||||||
## <a id="objecttype-scheduleddowntime"></a> ScheduledDowntime
|
## <a id="objecttype-scheduleddowntime"></a> ScheduledDowntime
|
||||||
|
|
||||||
|
|
|
@ -217,6 +217,11 @@ void TimePeriod::UpdateRegion(double begin, double end, bool clearExisting)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TimePeriod::GetIsInside(void) const
|
||||||
|
{
|
||||||
|
return IsInside(Utility::GetTime());
|
||||||
|
}
|
||||||
|
|
||||||
bool TimePeriod::IsInside(double ts) const
|
bool TimePeriod::IsInside(double ts) const
|
||||||
{
|
{
|
||||||
ObjectLock olock(this);
|
ObjectLock olock(this);
|
||||||
|
|
|
@ -43,6 +43,8 @@ public:
|
||||||
|
|
||||||
void UpdateRegion(double begin, double end, bool clearExisting);
|
void UpdateRegion(double begin, double end, bool clearExisting);
|
||||||
|
|
||||||
|
virtual bool GetIsInside(void) const;
|
||||||
|
|
||||||
bool IsInside(double ts) const;
|
bool IsInside(double ts) const;
|
||||||
double FindNextTransition(double begin);
|
double FindNextTransition(double begin);
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,9 @@ class TimePeriod : CustomVarObject
|
||||||
[state] Value valid_begin;
|
[state] Value valid_begin;
|
||||||
[state] Value valid_end;
|
[state] Value valid_end;
|
||||||
[state] Array::Ptr segments;
|
[state] Array::Ptr segments;
|
||||||
|
[no_storage] bool is_inside {
|
||||||
|
get;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue