Allow to monitor Windows hosts (#6803)
This commit is contained in:
parent
b8c1bc9542
commit
d027df5a89
1 changed files with 5 additions and 1 deletions
|
@ -133,7 +133,11 @@ class GlancesSensor(Entity):
|
||||||
elif self.type == 'swap_free':
|
elif self.type == 'swap_free':
|
||||||
return round(value['memswap']['free'] / 1024**3, 1)
|
return round(value['memswap']['free'] / 1024**3, 1)
|
||||||
elif self.type == 'processor_load':
|
elif self.type == 'processor_load':
|
||||||
return value['load']['min15']
|
# Windows systems don't provide load details
|
||||||
|
try:
|
||||||
|
return value['load']['min15']
|
||||||
|
except KeyError:
|
||||||
|
return value['cpu']['total']
|
||||||
elif self.type == 'process_running':
|
elif self.type == 'process_running':
|
||||||
return value['processcount']['running']
|
return value['processcount']['running']
|
||||||
elif self.type == 'process_total':
|
elif self.type == 'process_total':
|
||||||
|
|
Loading…
Add table
Reference in a new issue