Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_mounts.sh

Rating
0 votes
Favoured:
0
Current Version
0.4
Last Release Date
2012-11-02
License
GPL
Hits
95798
Files:
FileDescription
check_mounts.shcheck_mounts.sh
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Verifies the current mounts correspond to those defined in /etc/fstab.
Return 0 [OK] if true, 1 [WARNING] if mounted but has no matching entry in /etc/fstab and 2 [CRITICAL] if an /etc/fstab entry is not currently mounted.
Supports: NFS3, NFS4, CIFS, SMBFS and S3FS mounts.

Sample usage:
$ ./check_mounts.sh

OUTPUT:
/etc/fstab and /proc/mounts are not identical :(

Critical: these are not mounted but do appear in /etc/fstab:
+//10.0.0.3/my_vol /mnt/my_vol
Verifies the current mounts correspond to those defined in /etc/fstab.
Return 0 [OK] if true, 1 [WARNING] if mounted but has no matching entry in /etc/fstab and 2 [CRITICAL] if an /etc/fstab entry is not currently mounted.
Supports: NFS3, NFS4, CIFS, SMBFS and S3FS mounts.

Sample usage:
$ ./check_mounts.sh

OUTPUT:
/etc/fstab and /proc/mounts are not identical :(

Critical: these are not mounted but do appear in /etc/fstab:
+//10.0.0.3/my_vol /mnt/my_vol

CHANGELOG:
04/19/2012 04:56:00 PM EDT:
- Added support for nfs4 [patch by Michael Hübner m.huebner@reinform.de]
11/02/2012 05:07:00 PM EDT:
- Added support for s3fs
12/08/2013 06:21:00 PM EDT:
- Added test to touch a file in the mount, will only be checked if timeout util exists
- Fixed EOL prints