bundles/zfs: fix monitoring metadata
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2020-11-10 10:35:01 +01:00
parent f80896fa3b
commit 65a8efc97f
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 12 additions and 14 deletions

View file

@ -46,20 +46,20 @@ files = {
'/usr/local/sbin/zfs-auto-snapshot': { '/usr/local/sbin/zfs-auto-snapshot': {
'mode': '0755', 'mode': '0755',
}, },
'/usr/lib/nagios/plugins/check_zfs_auto_snapshot': { '/usr/local/share/icinga/plugins/check_zfs_auto_snapshot': {
'mode': '0755', 'mode': '0755',
}, },
'/usr/lib/nagios/plugins/check_zfs_old_snapshots': { '/usr/local/share/icinga/plugins/check_zfs_old_snapshots': {
'mode': '0755', 'mode': '0755',
}, },
"/usr/lib/nagios/plugins/check_zfs_volumes": { "/usr/local/share/icinga/plugins/check_zfs_volumes": {
'mode': '0755', 'mode': '0755',
'content_type': 'mako', 'content_type': 'mako',
}, },
"/usr/lib/nagios/plugins/check_zpool_online": { "/usr/local/share/icinga/plugins/check_zpool_online": {
'mode': '0755', 'mode': '0755',
}, },
"/usr/lib/nagios/plugins/check_zpool_space": { "/usr/local/share/icinga/plugins/check_zpool_space": {
'mode': '0755', 'mode': '0755',
}, },
} }

View file

@ -72,11 +72,14 @@ if node.has_bundle('sshmon'):
'zfs': { 'zfs': {
'services': { 'services': {
'ZFS AUTO SNAPSHOT': { 'ZFS AUTO SNAPSHOT': {
'command_on_monitored_host': '/usr/lib/nagios/plugins/check_zfs_auto_snapshot', 'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_zfs_auto_snapshot',
}, },
'ZFS MOUNTED VOLUMES': { 'ZFS MOUNTED VOLUMES': {
'command_on_monitored_host': '/usr/lib/nagios/plugins/check_zfs_volumes', 'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_zfs_volumes',
}, },
'ZFS OLD SNAPSHOTS': {
'command_on_monitored_host': 'sudo /usr/local/share/icinga/plugins/check_zfs_old_snapshots',
}
}, },
}, },
}, },
@ -143,18 +146,13 @@ def monitoring(metadata):
for poolname, pool_options in metadata.get('zfs/pools').items(): for poolname, pool_options in metadata.get('zfs/pools').items():
services['ZFS ZPOOL ONLINE {}'.format(poolname)] = { services['ZFS ZPOOL ONLINE {}'.format(poolname)] = {
'command_on_monitored_host': 'sudo /usr/lib/nagios/plugins/check_zpool_online {}'.format(poolname), 'command_on_monitored_host': 'sudo /usr/local/share/icinga/plugins/check_zpool_online {}'.format(poolname),
} }
services['ZFS ZPOOL SPACE ' + poolname] = { services['ZFS ZPOOL SPACE ' + poolname] = {
'command_on_monitored_host': 'sudo /usr/lib/nagios/plugins/check_zpool_space {} 90'.format(poolname) 'command_on_monitored_host': 'sudo /usr/local/share/icinga/plugins/check_zpool_space {} 90'.format(poolname)
} }
services['ZFS OLD SNAPSHOTS'] = {
'command_on_monitored_host': 'sudo /usr/lib/nagios/plugins/check_zfs_old_snapshots',
}
return { return {
'icinga2_api': { 'icinga2_api': {
'zfs': { 'zfs': {