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