From 5c416628a579131d57e75f217bfb7845a66fe62f Mon Sep 17 00:00:00 2001 From: "brianpkelly (no email)" Date: Tue, 9 Jun 2015 13:52:54 -0500 Subject: [PATCH] write_redis: Increase parsability of multi-valued keys by insterting delimiting characters --- src/write_redis.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/write_redis.c b/src/write_redis.c index f2090167..61893ff3 100644 --- a/src/write_redis.c +++ b/src/write_redis.c @@ -87,6 +87,10 @@ static int wr_write (const data_set_t *ds, /* {{{ */ APPEND ("%.3f:", CDTIME_T_TO_DOUBLE (vl->time)); for (i = 0; i < ds->ds_num; i++) { + // Increase parsability by delimiting the individual values + if (ds->ds_num > 1 && i > 0) + APPEND ("%s", "|"); + if (ds->ds[i].type == DS_TYPE_COUNTER) APPEND ("%llu", vl->values[i].counter); else if (ds->ds[i].type == DS_TYPE_GAUGE) -- 2.30.2