From 5c17465a19c077e161b574c57225676c3be1a86d Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 28 Mar 2024 14:02:49 +0100 Subject: [PATCH] OpenTsdbWriter#CheckResultHandler(): skip custom tags with empty values refs #7724 --- lib/perfdata/opentsdbwriter.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/perfdata/opentsdbwriter.cpp b/lib/perfdata/opentsdbwriter.cpp index 1a9e62781..461e1bfdd 100644 --- a/lib/perfdata/opentsdbwriter.cpp +++ b/lib/perfdata/opentsdbwriter.cpp @@ -212,6 +212,14 @@ void OpenTsdbWriter::CheckResultHandler(const Checkable::Ptr& checkable, const C continue; } + + if (value.IsEmpty()) { + Log(LogDebug, "OpenTsdbWriter") + << "Resolved macro '" << pair.second + << "' for checkable '" << checkable->GetName() << "' to '', skipping."; + + continue; + } String tagname = Convert::ToString(pair.first); tags[tagname] = EscapeTag(value);