]> granicus.if.org Git - icinga2/commitdiff
GraphiteWriter: Add crit/warn/min/max perfdata values
authorMichael Friedrich <michael.friedrich@gmail.com>
Fri, 10 Oct 2014 18:43:49 +0000 (20:43 +0200)
committerMichael Friedrich <michael.friedrich@gmail.com>
Sat, 11 Oct 2014 15:02:38 +0000 (17:02 +0200)
fixes #7366

components/perfdata/graphitewriter.cpp

index 9226f57916cd98ae99aa483e03b92ce80fe28323..c0d6d3536688d76a08b150b336d1952441deef39 100644 (file)
@@ -160,6 +160,15 @@ void GraphiteWriter::SendPerfdata(const String& prefix, const CheckResult::Ptr&
                boost::algorithm::replace_all(escaped_key, "::", ".");
 
                SendMetric(prefix, escaped_key, pdv->GetValue());
+
+               if (pdv->GetCrit())
+                       SendMetric(prefix, escaped_key + "_crit", pdv->GetCrit());
+               if (pdv->GetWarn())
+                       SendMetric(prefix, escaped_key + "_warn", pdv->GetWarn());
+               if (pdv->GetMin())
+                       SendMetric(prefix, escaped_key + "_min", pdv->GetMin());
+               if (pdv->GetMax())
+                       SendMetric(prefix, escaped_key + "_max", pdv->GetMax());
        }
 }