projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a621ced
)
write_redis: Increase parsability of multi-valued keys by insterting delimiting chara...
author
brianpkelly (no email)
<collectd@verplant.org>
Tue, 9 Jun 2015 18:52:54 +0000
(13:52 -0500)
committer
Florian Forster
<octo@collectd.org>
Thu, 11 Jun 2015 15:41:01 +0000
(16:41 +0100)
src/write_redis.c
patch
|
blob
|
history
diff --git
a/src/write_redis.c
b/src/write_redis.c
index
f209016
..
61893ff
100644
(file)
--- 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)