diff options
author | nicolargo <nicolas@nicolargo.com> | 2019-08-13 10:50:10 +0200 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2019-08-13 10:50:10 +0200 |
commit | 848740e5b303f6de733d065defdc359fb031c64d (patch) | |
tree | 046b3659517b43b9c8700ff979ae6c44cf3277be | |
parent | 55752a97884f1ad8d7b94cedeb86e1b30c4e9ad2 (diff) |
HDDTEMP config IP? #1508
-rw-r--r-- | conf/glances.conf | 3 | ||||
-rw-r--r-- | glances/plugins/glances_hddtemp.py | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/conf/glances.conf b/conf/glances.conf index b8a6e961..87ae7660 100644 --- a/conf/glances.conf +++ b/conf/glances.conf @@ -194,6 +194,9 @@ critical=90 temperature_core_careful=60 temperature_core_warning=70 temperature_core_critical=80 +# Define hddtemp server IP and port (default is 127.0.0.1 and 7634 (TCP)) +hddtemp_host=127.0.0.1 +hddtemp_port=7634 # Temperatures threshold in °C for hddtemp # Default values if not defined: 45/52/60 temperature_hdd_careful=45 diff --git a/glances/plugins/glances_hddtemp.py b/glances/plugins/glances_hddtemp.py index 4dbcb392..ad4cca4c 100644 --- a/glances/plugins/glances_hddtemp.py +++ b/glances/plugins/glances_hddtemp.py @@ -39,7 +39,11 @@ class Plugin(GlancesPlugin): stats_init_value=[]) # Init the sensor class - self.glancesgrabhddtemp = GlancesGrabHDDTemp(args=args) + self.hddtemp = GlancesGrabHDDTemp(args=args, + host=self.get_conf_value("hddtemp_host", + default="127.0.0.1"), + port=int(self.get_conf_value("hddtemp_port", + default="7634"))) # We do not want to display the stat in a dedicated area # The HDD temp is displayed within the sensors plugin @@ -54,7 +58,7 @@ class Plugin(GlancesPlugin): if self.input_method == 'local': # Update stats using the standard system lib - stats = self.glancesgrabhddtemp.get() + stats = self.hddtemp.get() else: # Update stats using SNMP |