Seen this inside the InfluxDBWriter code, makes sense to store
this in Elasticsearch too.
fields->Set(perfdataPrefix + ".warn", pdv->GetWarn());
if (pdv->GetCrit())
fields->Set(perfdataPrefix + ".crit", pdv->GetCrit());
+
+ if (!pdv->GetUnit().IsEmpty())
+ fields->Set(perfdataPrefix + ".unit", pdv->GetUnit());
}
}
}
fields->Set("_" + escaped_key + "_warn", pdv->GetWarn());
if (pdv->GetCrit())
fields->Set("_" + escaped_key + "_crit", pdv->GetCrit());
+
+ if (!pdv->GetUnit().IsEmpty())
+ fields->Set("_" + escaped_key + "_unit", pdv->GetUnit());
}
}
}