diff --git a/bundles/zfs/metadata.py b/bundles/zfs/metadata.py index 001d7ab..6bd15a8 100644 --- a/bundles/zfs/metadata.py +++ b/bundles/zfs/metadata.py @@ -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),