From ab3f849d0f75991f8d9b84368cb1b169b7ded192 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 14 Aug 2021 11:00:47 +0200 Subject: [PATCH] Glances don't send hostname (tag) to influxdb2 --- glances/exports/glances_influxdb2.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/glances/exports/glances_influxdb2.py b/glances/exports/glances_influxdb2.py index 55bae118..87a6c3bc 100644 --- a/glances/exports/glances_influxdb2.py +++ b/glances/exports/glances_influxdb2.py @@ -20,6 +20,7 @@ """InfluxDB (from to InfluxDB 1.8+) interface class.""" import sys +from platform import node from glances.logger import logger from glances.exports.glances_export import GlancesExport @@ -56,6 +57,9 @@ class Export(GlancesExport): if not self.export_enable: sys.exit(2) + # The hostname is always add as a tag + self.hostname = node().split('.')[0] + # Init the InfluxDB client self.client = self.init() -- GitLab