mirror of https://github.com/Icinga/icinga2.git
Fix Service::GetEnablePerfdata().
This commit is contained in:
parent
0ab76e7843
commit
204f04f295
|
@ -94,7 +94,7 @@ void GraphiteWriter::ReconnectTimerHandler(void)
|
|||
|
||||
void GraphiteWriter::CheckResultHandler(const Service::Ptr& service, const Dictionary::Ptr& cr)
|
||||
{
|
||||
if (!(IcingaApplication::GetInstance()->GetEnablePerfdata() && service->GetEnablePerfdata()))
|
||||
if (!IcingaApplication::GetInstance()->GetEnablePerfdata() || !service->GetEnablePerfdata())
|
||||
return;
|
||||
|
||||
Host::Ptr host = service->GetHost();
|
||||
|
|
|
@ -84,7 +84,7 @@ double PerfdataWriter::GetRotationInterval(void) const
|
|||
|
||||
void PerfdataWriter::CheckResultHandler(const Service::Ptr& service, const Dictionary::Ptr& cr)
|
||||
{
|
||||
if (!(IcingaApplication::GetInstance()->GetEnablePerfdata() && service->GetEnablePerfdata()))
|
||||
if (!IcingaApplication::GetInstance()->GetEnablePerfdata() || !service->GetEnablePerfdata())
|
||||
return;
|
||||
|
||||
Host::Ptr host = service->GetHost();
|
||||
|
|
|
@ -330,7 +330,10 @@ std::set<Service::Ptr> Service::GetParentServices(void) const
|
|||
|
||||
bool Service::GetEnablePerfdata(void) const
|
||||
{
|
||||
return m_EnablePerfdata;
|
||||
if (!m_EnablePerfdata.IsEmpty())
|
||||
return m_EnablePerfdata;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
int Service::GetModifiedAttributes(void) const
|
||||
|
|
Loading…
Reference in New Issue