allow the hidden flag to be set by plugins and propagate it with streaming
Costa Tsaousis (ktsaou) committed
Feb 25, 2018 at 01:16 UTC
a14ec71f5fe2b70c83493ba53475672409b21103
2 files changed
+7
-1
src/plugins_d.c
+5
@@ -331,6 +331,11 @@ inline size_t pluginsd_process(RRDHOST *host, struct plugind *cd, FILE *fp, int
331
else
332
rrdset_flag_clear(st, RRDSET_FLAG_DETAIL);
333
334
+ if(strstr(options, "hidden"))
335
+ rrdset_flag_set(st, RRDSET_FLAG_HIDDEN);
336
+ else
337
+ rrdset_flag_clear(st, RRDSET_FLAG_HIDDEN);
338
+
339
if(strstr(options, "store_first"))
340
rrdset_flag_set(st, RRDSET_FLAG_STORE_FIRST);
341
else
src/rrdpush.c
+2
-1
@@ -86,7 +86,7 @@ static inline void rrdpush_send_chart_definition_nolock(RRDSET *st) {
86
// send the chart
87
buffer_sprintf(
88
host->rrdpush_sender_buffer
89
- , "CHART \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" %ld %d \"%s %s %s\" \"%s\" \"%s\"\n"
89
+ , "CHART \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" %ld %d \"%s %s %s %s\" \"%s\" \"%s\"\n"
90
, st->id
91
, st->name
92
, st->title
@@ -99,6 +99,7 @@ static inline void rrdpush_send_chart_definition_nolock(RRDSET *st) {
99
, rrdset_flag_check(st, RRDSET_FLAG_OBSOLETE)?"obsolete":""
100
, rrdset_flag_check(st, RRDSET_FLAG_DETAIL)?"detail":""
101
, rrdset_flag_check(st, RRDSET_FLAG_STORE_FIRST)?"store_first":""
102
+ , rrdset_flag_check(st, RRDSET_FLAG_HIDDEN)?"hidden":""
103
, (st->plugin_name)?st->plugin_name:""
104
, (st->module_name)?st->module_name:""
105
);