Merge pull request #7928 from Icinga/bugfix/opentsdb-custom-tag-empty-string-7724

OpenTsdbWriter#CheckResultHandler(): skip custom tags with empty values
This commit is contained in:
Alexander Aleksandrovič Klimov 2024-04-18 13:32:14 +02:00 committed by GitHub
commit 7aaaa0b9b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -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);