diff --git a/glances/plugins/diskio/__init__.py b/glances/plugins/diskio/__init__.py index 425ca6ea..d189e0c4 100644 --- a/glances/plugins/diskio/__init__.py +++ b/glances/plugins/diskio/__init__.py @@ -190,15 +190,15 @@ class DiskioPlugin(GlancesPluginModel): # continue # Decorate the bitrate with the configuration file - alert_rx = self.get_alert(i['read_bytes'], header=disk_real_name + '_rx') - alert_tx = self.get_alert(i['write_bytes'], header=disk_real_name + '_tx') + alert_rx = self.get_alert(i['read_bytes'], header='rx', action_key=disk_real_name) + alert_tx = self.get_alert(i['write_bytes'], header='tx', action_key=disk_real_name) self.views[i[self.get_key()]]['read_bytes']['decoration'] = alert_rx self.views[i[self.get_key()]]['write_bytes']['decoration'] = alert_tx # Decorate the latency with the configuration file # Try to get the read/write latency for the current disk - alert_latency_rx = self.get_alert(i['read_latency'], header=disk_real_name + '_rx_latency') - alert_latency_tx = self.get_alert(i['write_latency'], header=disk_real_name + '_tx_latency') + alert_latency_rx = self.get_alert(i['read_latency'], header='rx_latency', action_key=disk_real_name) + alert_latency_tx = self.get_alert(i['write_latency'], header='tx_latency', action_key=disk_real_name) # If the alert is not defined, use the default one if alert_latency_rx == 'DEFAULT': alert_latency_rx = self.get_alert(i['read_latency'], header='rx_latency') diff --git a/glances/plugins/network/__init__.py b/glances/plugins/network/__init__.py index 1155cdea..7ce5103d 100644 --- a/glances/plugins/network/__init__.py +++ b/glances/plugins/network/__init__.py @@ -219,8 +219,6 @@ class NetworkPlugin(GlancesPluginModel): bps_tx = int(i['bytes_sent_rate_per_sec'] * 8) # Decorate the bitrate with the configuration file thresholds - # alert_rx = self.get_alert(bps_rx, header=if_real_name + '_rx') - # alert_tx = self.get_alert(bps_tx, header=if_real_name + '_tx') alert_rx = self.get_alert(bps_rx, header='rx', action_key=if_real_name) alert_tx = self.get_alert(bps_tx, header='tx', action_key=if_real_name)