summaryrefslogtreecommitdiffstats
path: root/exporting/graphite
diff options
context:
space:
mode:
authorVladimir Kobal <vlad@prokk.net>2020-05-14 11:03:42 +0300
committerGitHub <noreply@github.com>2020-05-14 11:03:42 +0300
commitf152ecf8ac5ba28df74567d4ad3b6033d36782d4 (patch)
tree881997893fdc7dc8605be04b1f7362f392c888f7 /exporting/graphite
parentb5f8c224a9636c071fc474634380b4a93ea21c28 (diff)
Fix wrong hostnames in the exporting engine (#8892)
Diffstat (limited to 'exporting/graphite')
-rw-r--r--exporting/graphite/graphite.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/exporting/graphite/graphite.c b/exporting/graphite/graphite.c
index d3f928583c..88b61343fb 100644
--- a/exporting/graphite/graphite.c
+++ b/exporting/graphite/graphite.c
@@ -127,7 +127,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",
engine->config.prefix,
- engine->config.hostname,
+ (host == localhost) ? engine->config.hostname : host->hostname,
chart_name,
dimension_name,
(host->tags) ? ";" : "",
@@ -174,7 +174,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",
engine->config.prefix,
- engine->config.hostname,
+ (host == localhost) ? engine->config.hostname : host->hostname,
chart_name,
dimension_name,
(host->tags) ? ";" : "",