summaryrefslogtreecommitdiffstats
path: root/src/rrd2json.c
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2018-03-11 23:46:22 +0200
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2018-03-11 23:46:22 +0200
commit5f2514675334e52cabd9fe5677f44d325e3b9b37 (patch)
tree5641294f7bb85abd1452dfc250187973cf46a5cd /src/rrd2json.c
parentd58d4b131528764aee57175bc1710e8c38b3e8d9 (diff)
propagate netdata version with streaming; add netdata version to prometheus metrics; fixes #3519
Diffstat (limited to 'src/rrd2json.c')
-rw-r--r--src/rrd2json.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/rrd2json.c b/src/rrd2json.c
index deae262216..24b3da3409 100644
--- a/src/rrd2json.c
+++ b/src/rrd2json.c
@@ -128,7 +128,7 @@ void rrd_stats_api_v1_charts(RRDHOST *host, BUFFER *wb) {
",\n\t\"custom_info\": \"%s\""
",\n\t\"charts\": {"
, host->hostname
- , program_version
+ , host->program_version
, host->os
, host->timezone
, host->rrd_update_every
@@ -1849,10 +1849,12 @@ int rrdset2value_api_v1(
return 400;
}
- if(r->result_options & RRDR_RESULT_OPTION_RELATIVE)
- buffer_no_cacheable(wb);
- else if(r->result_options & RRDR_RESULT_OPTION_ABSOLUTE)
- buffer_cacheable(wb);
+ if(wb) {
+ if (r->result_options & RRDR_RESULT_OPTION_RELATIVE)
+ buffer_no_cacheable(wb);
+ else if (r->result_options & RRDR_RESULT_OPTION_ABSOLUTE)
+ buffer_cacheable(wb);
+ }
options = rrdr_check_options(r, options, dimensions);