Skip to content

Instantly share code, notes, and snippets.

@jhrcz
Last active December 14, 2015 15:19
Show Gist options
  • Save jhrcz/5107364 to your computer and use it in GitHub Desktop.
Save jhrcz/5107364 to your computer and use it in GitHub Desktop.
check_bindmounts showcase
ukazka check_bindmounts
vyuziva findmnt a diff mezi jeho pohledem na mtab a fstab,
pokud neni zaznam v obou tak je reportovano
### instalace
yum install --enablerepo=etn-devel nagios-plugin-check-bindmounts
### ukazka kdyz spatne
[root@XXXX ~]# tail /etc/fstab -n 6
/mnt/storage/srv /srv none bind 0 0
/mnt/sss /mnt/tmp none bind,noauto 0 0
/mnt/ddd /mnt/tmp none bind,noauto 0 0
[root@XXXX ~]# /usr/lib64/nagios/plugins/check_bindmounts
STATUS CRITICAL -- not all mountbinds mounted: /mnt/ddd /mnt/sss
### ukazka kdyz ok
[root@XXXX ~]# tail /etc/fstab -n 6
/mnt/storage/srv /srv none bind 0 0
#/mnt/sss /mnt/tmp none bind,noauto 0 0
#/mnt/ddd /mnt/tmp none bind,noauto 0 0
[root@XXXX ~]# /usr/lib64/nagios/plugins/check_bindmounts
status ok -- all mountbinds mounted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment