diff --git a/lib/perfdata/influxdbcommonwriter.cpp b/lib/perfdata/influxdbcommonwriter.cpp index b41708050..fc3786c89 100644 --- a/lib/perfdata/influxdbcommonwriter.cpp +++ b/lib/perfdata/influxdbcommonwriter.cpp @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -399,7 +398,7 @@ void InfluxdbCommonWriter::SendMetric(const Checkable::Ptr& checkable, const Dic } } - msgbuf << " " << std::fixed << std::setprecision(0) << ts * 1.0e9; + msgbuf << " " << static_cast(ts); Log(LogDebug, GetReflectionType()->GetName()) << "Checkable '" << checkable->GetName() << "' adds to metric list:'" << msgbuf.str() << "'."; @@ -554,7 +553,7 @@ Url::Ptr InfluxdbCommonWriter::AssembleBaseUrl() url->SetScheme(GetSslEnable() ? "https" : "http"); url->SetHost(GetHost()); url->SetPort(GetPort()); - url->AddQueryElement("precision", "ns"); + url->AddQueryElement("precision", "s"); return url; }