-
Notifications
You must be signed in to change notification settings - Fork 390
/
main.py
26 lines (23 loc) · 829 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from opserver.plugins.alarm_base import *
from opserver.sandesh.alarmgen_ctrl.sandesh_alarm_base.ttypes import *
class DiskUsage(AlarmBase):
"""Disk Usage crosses a threshold.
NodeMgr reports disk usage in NodeStatus.disk_usage_info"""
_RULES = {
'or_list': [
{
'and_list': [
{
'operand1': 'NodeStatus.disk_usage_info.' + \
'percentage_partition_space_used',
'operation': '>=',
'operand2': '90',
'variables': \
['NodeStatus.disk_usage_info.partition_name']
}
]
}
]
}
def __init__(self):
AlarmBase.__init__(self, AlarmBase.SYS_ERR)