mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 23:20:37 +00:00
fix: 修改磁盘使用等key值
This commit is contained in:
@@ -39,14 +39,14 @@ class ServerPerformanceCheckUtil(object):
|
||||
'max_threshold': False,
|
||||
'alarm_msg_format': _('The terminal is offline: {name}')
|
||||
},
|
||||
'disk_usage': {
|
||||
'disk_used': {
|
||||
'default': 0,
|
||||
'max_threshold': 80,
|
||||
'alarm_msg_format': _(
|
||||
'[Disk] Disk used more than {max_threshold}%: => {value} ({name})'
|
||||
)
|
||||
},
|
||||
'memory_usage': {
|
||||
'memory_used': {
|
||||
'default': 0,
|
||||
'max_threshold': 85,
|
||||
'alarm_msg_format': _(
|
||||
@@ -82,7 +82,6 @@ class ServerPerformanceCheckUtil(object):
|
||||
default = data['default']
|
||||
max_threshold = data['max_threshold']
|
||||
value = getattr(self._terminal.stat, item, default)
|
||||
print(value, max_threshold, self._terminal.name, self._terminal.id)
|
||||
if isinstance(value, bool) and value != max_threshold:
|
||||
return
|
||||
elif isinstance(value, (int, float)) and value < max_threshold:
|
||||
|
Reference in New Issue
Block a user