bundles/zfs: add metadata option to disable ZFS OLD SNAPSHOTS check

This commit is contained in:
Franzi 2022-04-06 18:13:01 +02:00
parent a2d8979b91
commit 4390256abc
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -45,9 +45,6 @@ defaults = {
'command_on_monitored_host': 'sudo /usr/local/share/icinga/plugins/check_zfs_volumes',
'vars.notification.mail': True,
},
'ZFS OLD SNAPSHOTS': {
'command_on_monitored_host': 'sudo /usr/local/share/icinga/plugins/check_zfs_old_snapshots',
}
},
},
},
@ -158,6 +155,11 @@ def monitoring(metadata):
services = {}
if metadata.get('zfs/enable_old_snapshots_check', True):
services['ZFS OLD SNAPSHOTS'] = {
'command_on_monitored_host': 'sudo /usr/local/share/icinga/plugins/check_zfs_old_snapshots',
}
for poolname, _ in metadata.get('zfs/pools').items():
services['ZFS ZPOOL ONLINE {}'.format(poolname)] = {
'command_on_monitored_host': 'sudo /usr/local/share/icinga/plugins/check_zpool_online {}'.format(poolname),