diff --git a/openwisp_monitoring/check/classes/iperf.py b/openwisp_monitoring/check/classes/iperf.py index acfecfed3..38f12562b 100644 --- a/openwisp_monitoring/check/classes/iperf.py +++ b/openwisp_monitoring/check/classes/iperf.py @@ -27,7 +27,6 @@ def check(self, store=True): f'DeviceConnection is not properly set for "{device}", iperf check skipped!' ) return - device_connection.connect() # The DeviceConnection could fail if the management tunnel is down. if not device_connection.connect(): logger.warning( @@ -40,6 +39,9 @@ def check(self, store=True): command, raise_unexpected_exit=False ) if store and exit_code != 0: + logger.warning( + f'Iperf check failed for "{device}", {json.loads(res)["error"]}' + ) self.store_result_fail() device_connection.disconnect() return @@ -51,6 +53,9 @@ def check(self, store=True): command, raise_unexpected_exit=False ) if store and exit_code != 0: + logger.warning( + f'Iperf check failed for "{device}", {json.loads(res)["error"]}' + ) self.store_result_fail() device_connection.disconnect() return diff --git a/openwisp_monitoring/monitoring/configuration.py b/openwisp_monitoring/monitoring/configuration.py index aabd5870c..5199859c1 100644 --- a/openwisp_monitoring/monitoring/configuration.py +++ b/openwisp_monitoring/monitoring/configuration.py @@ -582,11 +582,11 @@ def _get_access_tech(): 'total': 'lines', }, 'trace_order': ['total', 'received', 'sent'], - 'description': _('Total transfer during Iperf3 test in TCP mode.'), + 'description': _('Transfer during Iperf3 test in TCP mode.'), 'summary_labels': [ + _('Total bytes'), _('Received bytes'), _('Sent bytes'), - _('Total upload traffic'), ], 'unit': _(' GB'), 'order': 290,