]> granicus.if.org Git - icinga2/commitdiff
Fix enable_perfdata.
authorMichael Friedrich <michael.friedrich@netways.de>
Wed, 16 Oct 2013 15:18:21 +0000 (17:18 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Wed, 16 Oct 2013 15:18:21 +0000 (17:18 +0200)
components/perfdata/graphitewriter.cpp
components/perfdata/perfdatawriter.cpp
etc/icinga2/conf.d/generic-service.conf
lib/icinga/icinga-type.conf

index ab01a2f075bf6b55bcf303b95947953ccb55c060..75360447a211391b1925f1fa27988f481314c113 100644 (file)
@@ -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();
index 6d9282dd1bab31e744d5075572d740a0a44322c7..1dfe35c8cd132c3974ccad6a5db9b15d9fb11959 100644 (file)
@@ -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();
index a734b414830f0b19f3478f02fe699b433023d17f..7e8acb8f2cfb54c3dc11c6c62714192ffd659f52 100644 (file)
@@ -6,6 +6,7 @@ template Service "generic-service" {
   max_check_attempts = 3,
   check_interval = 5m,
   retry_interval = 1m,
+  enable_perfdata = 1,
 
   notifications["mail-icingaadmin"] = {
     templates = [ "mail-notification" ],
index f6d525369a85eb8d48feb87b6992b58bad495383..fe684a63d080c69cd595216f1cc9eb65c37c3d1d 100644 (file)
@@ -85,6 +85,8 @@ type Service {
        %attribute number "enable_flapping",
        %attribute number "flapping_threshold",
 
+       %attribute number "enable_perfdata",
+
        %attribute number "volatile",
 
        %attribute array "host_dependencies" {