diff options
author | Vladimir Kobal <vlad@prokk.net> | 2020-05-14 11:03:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-14 11:03:42 +0300 |
commit | f152ecf8ac5ba28df74567d4ad3b6033d36782d4 (patch) | |
tree | 881997893fdc7dc8605be04b1f7362f392c888f7 /exporting/opentsdb | |
parent | b5f8c224a9636c071fc474634380b4a93ea21c28 (diff) |
Fix wrong hostnames in the exporting engine (#8892)
Diffstat (limited to 'exporting/opentsdb')
-rw-r--r-- | exporting/opentsdb/opentsdb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/exporting/opentsdb/opentsdb.c b/exporting/opentsdb/opentsdb.c index 2d5b2db698..3bfb145517 100644 --- a/exporting/opentsdb/opentsdb.c +++ b/exporting/opentsdb/opentsdb.c @@ -170,7 +170,7 @@ int format_dimension_collected_opentsdb_telnet(struct instance *instance, RRDDIM dimension_name, (unsigned long long)rd->last_collected_time.tv_sec, rd->last_collected_value, - engine->config.hostname, + (host == localhost) ? engine->config.hostname : host->hostname, (host->tags) ? " " : "", (host->tags) ? host->tags : "", (instance->labels) ? buffer_tostring(instance->labels) : ""); @@ -217,7 +217,7 @@ int format_dimension_stored_opentsdb_telnet(struct instance *instance, RRDDIM *r dimension_name, (unsigned long long)last_t, value, - engine->config.hostname, + (host == localhost) ? engine->config.hostname : host->hostname, (host->tags) ? " " : "", (host->tags) ? host->tags : "", (instance->labels) ? buffer_tostring(instance->labels) : ""); @@ -327,7 +327,7 @@ int format_dimension_collected_opentsdb_http(struct instance *instance, RRDDIM * dimension_name, (unsigned long long)rd->last_collected_time.tv_sec, rd->last_collected_value, - engine->config.hostname, + (host == localhost) ? engine->config.hostname : host->hostname, (host->tags) ? " " : "", (host->tags) ? host->tags : "", instance->labels ? buffer_tostring(instance->labels) : ""); @@ -387,7 +387,7 @@ int format_dimension_stored_opentsdb_http(struct instance *instance, RRDDIM *rd) dimension_name, (unsigned long long)last_t, value, - engine->config.hostname, + (host == localhost) ? engine->config.hostname : host->hostname, (host->tags) ? " " : "", (host->tags) ? host->tags : "", instance->labels ? buffer_tostring(instance->labels) : ""); |