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_mount.tcl

Rating
0 votes
Favoured:
0
Current Version
0.1
Last Release Date
2014-04-24
License
GPL
Hits
22105
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Checking that fstab mount points are mounted and that swaps are active.
This script parses fstab for volumes that should be mounted on startup or swap devices that should be enabled on startup. It then compares with currently mounted filesystems and active swap devices.

It reports as CRITICAL:
1. All mount points which should be mounted and which are not,
2. All mount points which are mounted with a different device than the one mentionned in fstab
3. All swap devices which should be active and which are not.

(note that 2. is not compatible with using UUID= notation in fstab)

This script requires tcl; it works on Linux and NetBSD. It does not use /proc/mounts, which does not exist on NetBSD. Instead, it calls the 'mount' command with no argument.

All command line parameters are optional and should not usually be required:

Usage: ./check_mount-0.1.tcl [-f ] [-m ] [-s ]

-f: alternate path for fstab file (very useful for tests and debug)
-m: alternate path and arguments for 'mount' command
-s: alternate path and arguments for the swap command which allows for listing currently active swaps.