diff --git a/components/perfdata/graphitewriter.cpp b/components/perfdata/graphitewriter.cpp index ec8190d8e..331f62084 100644 --- a/components/perfdata/graphitewriter.cpp +++ b/components/perfdata/graphitewriter.cpp @@ -142,7 +142,10 @@ void GraphiteWriter::SendPerfdata(const String& prefix, const CheckResult::Ptr& Value pdv = cr->GetPerformanceData(); if (!pdv.IsObjectType()) + { + Log(LogWarning, "GraphiteWriter", "Could not send performance data: unparsed data."); return; + } Dictionary::Ptr perfdata = pdv; diff --git a/lib/icinga/perfdatavalue.cpp b/lib/icinga/perfdatavalue.cpp index 194938070..e34d833ee 100644 --- a/lib/icinga/perfdatavalue.cpp +++ b/lib/icinga/perfdatavalue.cpp @@ -19,6 +19,7 @@ #include "icinga/perfdatavalue.hpp" #include "base/convert.hpp" +#include "base/exception.hpp" #include #include #include diff --git a/lib/icinga/pluginutility.cpp b/lib/icinga/pluginutility.cpp index 77f7cc7a7..f2b280184 100644 --- a/lib/icinga/pluginutility.cpp +++ b/lib/icinga/pluginutility.cpp @@ -252,7 +252,8 @@ Value PluginUtility::ParsePerfdata(const String& perfdata) } return result; - } catch (const std::exception&) { + } catch (const std::exception& ex) { + Log(LogWarning, "PluginUtility", "Error parsing performance data '" + perfdata + "': " + ex.what()); return perfdata; } }