init filesystem
This commit is contained in:
@ -1369,6 +1369,14 @@ class SystemHealthMonitor:
|
|||||||
parts = fs_line.split()
|
parts = fs_line.split()
|
||||||
if len(parts) >= 6:
|
if len(parts) >= 6:
|
||||||
usage_percent = 0
|
usage_percent = 0
|
||||||
|
filesystem = {
|
||||||
|
'mountpoint': '',
|
||||||
|
'total': '',
|
||||||
|
'used': '',
|
||||||
|
'available': '',
|
||||||
|
'usage_percent': 0
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Skip pool name entries that start with 'appPool:'
|
# Skip pool name entries that start with 'appPool:'
|
||||||
if parts[0].startswith('appPool:'):
|
if parts[0].startswith('appPool:'):
|
||||||
@ -1385,13 +1393,13 @@ class SystemHealthMonitor:
|
|||||||
used_size = self._convert_size_to_bytes(parts[2])
|
used_size = self._convert_size_to_bytes(parts[2])
|
||||||
usage_percent = float(parts[4].rstrip('%'))
|
usage_percent = float(parts[4].rstrip('%'))
|
||||||
|
|
||||||
filesystem = {
|
filesystem.update({
|
||||||
'mountpoint': mountpoint,
|
'mountpoint': mountpoint,
|
||||||
'total': parts[1],
|
'total': parts[1],
|
||||||
'used': parts[2],
|
'used': parts[2],
|
||||||
'available': parts[3],
|
'available': parts[3],
|
||||||
'usage_percent': usage_percent
|
'usage_percent': usage_percent
|
||||||
}
|
})
|
||||||
|
|
||||||
if usage_percent >= self.CONFIG['THRESHOLDS']['DISK_CRITICAL']:
|
if usage_percent >= self.CONFIG['THRESHOLDS']['DISK_CRITICAL']:
|
||||||
lxc_health['status'] = 'CRITICAL'
|
lxc_health['status'] = 'CRITICAL'
|
||||||
|
|||||||
Reference in New Issue
Block a user