Graphite.pm needs correction

almku

Active Member
Feb 8, 2016
10
1
43
85
Hello,

Carbon (particularly carbon-c-relay) expects one metric per line. Current PVE implementation breaks this rule. The following patch corrects this bug

Code:
--- /usr/share/perl5/PVE/Status/Graphite.pm.orig  2016-04-26 20:03:02.961141497 +0000
+++ /usr/share/perl5/PVE/Status/Graphite.pm  2016-04-26 20:03:14.541705841 +0000
@@ -102,7 +102,7 @@
  if ( ref $value eq 'HASH' ) {
  write_graphite($carbon_socket, $value, $ctime, $path);
  }else {
-  $carbon_socket->send( "$path $value $ctime" );
+  $carbon_socket->send( "$path $value $ctime\n" );
  }
  }
  $path = $oldpath;