GraphiteWriter: Fix malformatted integer values

fixes #6756

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
This commit is contained in:
Ildar Hizbulin 2014-07-18 09:54:47 +04:00 committed by Michael Friedrich
parent 263f198992
commit 7ce61309b4
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ void GraphiteWriter::SendPerfdata(const String& prefix, const CheckResult::Ptr&
void GraphiteWriter::SendMetric(const String& prefix, const String& name, double value) void GraphiteWriter::SendMetric(const String& prefix, const String& name, double value)
{ {
std::ostringstream msgbuf; std::ostringstream msgbuf;
msgbuf << prefix << "." << name << " " << value << " " << static_cast<long>(Utility::GetTime()) << "\n"; msgbuf << prefix << "." << name << " " << Convert::ToString(value) << " " << static_cast<long>(Utility::GetTime()) << "\n";
String metric = msgbuf.str(); String metric = msgbuf.str();
Log(LogDebug, "GraphiteWriter", "GraphiteWriter: Add to metric list:'" + metric + "'."); Log(LogDebug, "GraphiteWriter", "GraphiteWriter: Add to metric list:'" + metric + "'.");