mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 23:24:09 +02:00
parent
e30d3c5691
commit
4ab9d2604f
@ -402,6 +402,9 @@ void Service::ProcessCheckResult(const Dictionary::Ptr& cr)
|
|||||||
if (old_state != GetState() && old_stateType == StateTypeHard && GetStateType() == StateTypeHard)
|
if (old_state != GetState() && old_stateType == StateTypeHard && GetStateType() == StateTypeHard)
|
||||||
hardChange = true;
|
hardChange = true;
|
||||||
|
|
||||||
|
if (IsVolatile())
|
||||||
|
hardChange = true;
|
||||||
|
|
||||||
if (hardChange)
|
if (hardChange)
|
||||||
SetLastHardStateChange(now);
|
SetLastHardStateChange(now);
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@ Service::Service(const Dictionary::Ptr& serializedObject)
|
|||||||
RegisterAttribute("checkers", Attribute_Config, &m_Checkers);
|
RegisterAttribute("checkers", Attribute_Config, &m_Checkers);
|
||||||
|
|
||||||
RegisterAttribute("event_command", Attribute_Config, &m_EventCommand);
|
RegisterAttribute("event_command", Attribute_Config, &m_EventCommand);
|
||||||
|
RegisterAttribute("volatile", Attribute_Config, &m_Volatile);
|
||||||
|
|
||||||
RegisterAttribute("next_check", Attribute_Replicated, &m_NextCheck);
|
RegisterAttribute("next_check", Attribute_Replicated, &m_NextCheck);
|
||||||
RegisterAttribute("current_checker", Attribute_Replicated, &m_CurrentChecker);
|
RegisterAttribute("current_checker", Attribute_Replicated, &m_CurrentChecker);
|
||||||
@ -223,6 +224,14 @@ bool Service::IsReachable(void) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Service::IsVolatile(void) const
|
||||||
|
{
|
||||||
|
if (m_Volatile.IsEmpty())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return m_Volatile;
|
||||||
|
}
|
||||||
|
|
||||||
AcknowledgementType Service::GetAcknowledgement(void)
|
AcknowledgementType Service::GetAcknowledgement(void)
|
||||||
{
|
{
|
||||||
ASSERT(OwnsLock());
|
ASSERT(OwnsLock());
|
||||||
|
@ -94,6 +94,8 @@ public:
|
|||||||
std::set<Host::Ptr> GetParentHosts(void) const;
|
std::set<Host::Ptr> GetParentHosts(void) const;
|
||||||
std::set<Service::Ptr> GetParentServices(void) const;
|
std::set<Service::Ptr> GetParentServices(void) const;
|
||||||
|
|
||||||
|
bool IsVolatile(void) const;
|
||||||
|
|
||||||
bool IsReachable(void) const;
|
bool IsReachable(void) const;
|
||||||
|
|
||||||
AcknowledgementType GetAcknowledgement(void);
|
AcknowledgementType GetAcknowledgement(void);
|
||||||
@ -261,6 +263,7 @@ private:
|
|||||||
Attribute<long> m_Acknowledgement;
|
Attribute<long> m_Acknowledgement;
|
||||||
Attribute<double> m_AcknowledgementExpiry;
|
Attribute<double> m_AcknowledgementExpiry;
|
||||||
Attribute<String> m_HostName;
|
Attribute<String> m_HostName;
|
||||||
|
Attribute<bool> m_Volatile;
|
||||||
|
|
||||||
/* Checks */
|
/* Checks */
|
||||||
Attribute<String> m_CheckCommand;
|
Attribute<String> m_CheckCommand;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user