diff options
author | Vladimir Kobal <vlad@prokk.net> | 2020-12-14 16:25:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-14 16:25:13 +0200 |
commit | 81968dea3a411aed2f451a941354283b945a35de (patch) | |
tree | 58f9d1331a9bd7df27adc2e04e426220be9c0f07 /exporting/graphite | |
parent | c3b1528bb91250958c9947a33bb26c3a8e04bd38 (diff) |
Fix hostname configuration in the exporting engine (#10361)
Diffstat (limited to 'exporting/graphite')
-rw-r--r-- | exporting/graphite/graphite.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/exporting/graphite/graphite.c b/exporting/graphite/graphite.c index 23e40c369e..dac1d7682e 100644 --- a/exporting/graphite/graphite.c +++ b/exporting/graphite/graphite.c @@ -127,7 +127,6 @@ int format_host_labels_graphite_plaintext(struct instance *instance, RRDHOST *ho */ int format_dimension_collected_graphite_plaintext(struct instance *instance, RRDDIM *rd) { - struct engine *engine = instance->engine; RRDSET *st = rd->rrdset; RRDHOST *host = st->rrdhost; @@ -147,7 +146,7 @@ int format_dimension_collected_graphite_plaintext(struct instance *instance, RRD instance->buffer, "%s.%s.%s.%s%s%s%s " COLLECTED_NUMBER_FORMAT " %llu\n", instance->config.prefix, - (host == localhost) ? engine->config.hostname : host->hostname, + (host == localhost) ? instance->config.hostname : host->hostname, chart_name, dimension_name, (host->tags) ? ";" : "", @@ -168,7 +167,6 @@ int format_dimension_collected_graphite_plaintext(struct instance *instance, RRD */ int format_dimension_stored_graphite_plaintext(struct instance *instance, RRDDIM *rd) { - struct engine *engine = instance->engine; RRDSET *st = rd->rrdset; RRDHOST *host = st->rrdhost; @@ -194,7 +192,7 @@ int format_dimension_stored_graphite_plaintext(struct instance *instance, RRDDIM instance->buffer, "%s.%s.%s.%s%s%s%s " CALCULATED_NUMBER_FORMAT " %llu\n", instance->config.prefix, - (host == localhost) ? engine->config.hostname : host->hostname, + (host == localhost) ? instance->config.hostname : host->hostname, chart_name, dimension_name, (host->tags) ? ";" : "", |