]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Added a comma to the list of prohibited characters
authorMarat Salimzianov <marat.salimzianov@tomtom.com>
Wed, 21 Nov 2018 21:07:21 +0000 (22:07 +0100)
committerMarat Salimzianov <marat.salimzianov@tomtom.com>
Wed, 21 Nov 2018 21:07:21 +0000 (22:07 +0100)
src/utils_format_graphite.c
src/utils_format_graphite_test.c

index de3f0c2e7c8833ead031ddb5e77e4cbb23a47a64..a20ca30e55e89e8c54b1d2ddd1cabbb2d43fe98c 100644 (file)
@@ -29,7 +29,7 @@
 #include "utils_cache.h"
 #include "utils_format_graphite.h"
 
-#define GRAPHITE_FORBIDDEN " \t\"\\:!/()\n\r"
+#define GRAPHITE_FORBIDDEN " \t\"\\:!,/()\n\r"
 
 /* Utils functions to format data sets in graphite format.
  * Largely taken from write_graphite.c as it remains the same formatting */
index 42efa681654deb06774d1048d39892621d8d44d9..2dff0c53077242443789ff6e44b2b91768ed4363 100644 (file)
@@ -81,6 +81,11 @@ DEF_TEST(metric_name) {
           .type_instance = "test: \"hello\"",
           .want_name = "example@com.test-foo@@test@.single-test@@@hello@",
       },
+      {
+          .plugin_instance = "foo (test)",
+          .type_instance = "test: \"hello\"",
+          .want_name = "example,com.test-foo,,test,.single-test,,,hello,",
+      },
       /* flag GRAPHITE_SEPARATE_INSTANCES */
       {
           .plugin_instance = "foo",