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': {
'mode': '0755',
},
'/usr/lib/nagios/plugins/check_zfs_auto_snapshot': {
'/usr/local/share/icinga/plugins/check_zfs_auto_snapshot': {
'mode': '0755',
},
'/usr/lib/nagios/plugins/check_zfs_old_snapshots': {
'/usr/local/share/icinga/plugins/check_zfs_old_snapshots': {
'mode': '0755',
},
"/usr/lib/nagios/plugins/check_zfs_volumes": {
"/usr/local/share/icinga/plugins/check_zfs_volumes": {
'mode': '0755',
'content_type': 'mako',
},
"/usr/lib/nagios/plugins/check_zpool_online": {
"/usr/local/share/icinga/plugins/check_zpool_online": {
'mode': '0755',
},
"/usr/lib/nagios/plugins/check_zpool_space": {
"/usr/local/share/icinga/plugins/check_zpool_space": {
'mode': '0755',
},
}

View file

@ -72,11 +72,14 @@ if node.has_bundle('sshmon'):
'zfs': {
'services': {
'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': {
'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,16 +146,11 @@ def monitoring(metadata):
for poolname, pool_options in metadata.get('zfs/pools').items():
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] = {
'command_on_monitored_host': 'sudo /usr/lib/nagios/plugins/check_zpool_space {} 90'.format(poolname)
}
services['ZFS OLD SNAPSHOTS'] = {
'command_on_monitored_host': 'sudo /usr/lib/nagios/plugins/check_zfs_old_snapshots',
'command_on_monitored_host': 'sudo /usr/local/share/icinga/plugins/check_zpool_space {} 90'.format(poolname)
}
return {