bundles/zfs: move icinga2_api to metadata defaults

This commit is contained in:
Franzi 2021-02-13 08:37:00 +01:00
parent 2fbbaa1586
commit 7aeb46382d
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -48,6 +48,22 @@ defaults = {
'zfs-auto-snapshot-monthly': '0 0 1 * * root /usr/local/sbin/zfs-auto-snapshot monthly', 'zfs-auto-snapshot-monthly': '0 0 1 * * root /usr/local/sbin/zfs-auto-snapshot monthly',
'zfs-auto-snapshot-weekly': '0 0 * * 7 root /usr/local/sbin/zfs-auto-snapshot weekly', 'zfs-auto-snapshot-weekly': '0 0 * * 7 root /usr/local/sbin/zfs-auto-snapshot weekly',
}, },
'icinga2_api': {
'zfs': {
'services': {
'ZFS AUTO SNAPSHOT': {
'command_on_monitored_host': 'sudo /usr/local/share/icinga/plugins/check_zfs_auto_snapshot',
},
'ZFS MOUNTED VOLUMES': {
'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',
}
},
},
},
'zfs': { 'zfs': {
'datasets': {}, 'datasets': {},
'pools': {}, 'pools': {},
@ -62,26 +78,6 @@ defaults = {
}, },
} }
if node.has_bundle('sshmon'):
defaults.update({
'icinga2_api': {
'zfs': {
'services': {
'ZFS AUTO SNAPSHOT': {
'command_on_monitored_host': 'sudo /usr/local/share/icinga/plugins/check_zfs_auto_snapshot',
},
'ZFS MOUNTED VOLUMES': {
'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',
}
},
},
},
})
@metadata_reactor.provides( @metadata_reactor.provides(
'cron/zfs-scrub', 'cron/zfs-scrub',