diff options
Diffstat (limited to 'glances/exports/glances_mqtt.py')
-rw-r--r-- | glances/exports/glances_mqtt.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/glances/exports/glances_mqtt.py b/glances/exports/glances_mqtt.py index a6582a32..0f3d3587 100644 --- a/glances/exports/glances_mqtt.py +++ b/glances/exports/glances_mqtt.py @@ -45,7 +45,6 @@ class Export(GlancesExport): # Get the current hostname self.hostname = socket.gethostname() - self.port = int(self.port) or 8883 self.topic = self.topic or 'glances' self.user = self.user or 'glances' @@ -59,7 +58,7 @@ class Export(GlancesExport): # Init the MQTT client self.client = self.init() if not self.client: - exit('MQTT client initialization failed') + exit("MQTT client initialization failed") def init(self): """Init the connection to the MQTT server.""" @@ -74,7 +73,7 @@ class Export(GlancesExport): client.loop_start() return client except Exception as e: - logger.critical("Connection to MQTT server failed : %s " % e) + logger.critical("Connection to MQTT server %s:%s failed with error: %s " % (self.host, self.port, e)) return None def export(self, name, columns, points): |