[modules] Re-add load module
This commit is contained in:
parent
d19eb72296
commit
0a0e39b516
2 changed files with 45 additions and 0 deletions
|
@ -65,6 +65,13 @@ class Module(core.input.Object):
|
|||
def state(self, widget):
|
||||
return []
|
||||
|
||||
def threshold_state(self, value, warn, crit):
|
||||
if value > float(self.parameter('critical', crit)):
|
||||
return 'critical'
|
||||
if value > float(self.parameter('warning', warn)):
|
||||
return 'warning'
|
||||
return None
|
||||
|
||||
class Error(Module):
|
||||
def __init__(self, config, module, error):
|
||||
super().__init__(config, core.widget.Widget(self.full_text))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue