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_disk_snmp

Rating
0 votes
Favoured:
0
Current Version
2.2
Last Release Date
2010-05-05
Compatible With
  • Nagios 3.x
Hits
106751
Files:
FileDescription
check_disk_snmpVersion 2.2
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
check_disk_snmp
This Perl script uses SNMP to check remote Unix disk partitions and offers some good flexibility on regex inclusions and exclusions.
This is a plugin written in Perl to check remote Unix disks via SNMP. It was originally coded for Solaris machines, but seems to work for Linux as well.

* Specify MB free or % used as your threshold
* Uses SNMP
* Works on Solaris, should work ok on Linux
* Can "hard code" an array of partitions to ALWAYS ignore (e.g. /cdrom, /mnt, /var/run, etc)
* Optionally used colored HTML output
* Optionally include an icon in output that lists the threshold for the service
* Very flexible regular expressions to include/exclude partitions
* Alerts show only the partitions current in alarm status for clarity

Edit the script and verify the following paths and items:
- Perl path (first line)
- SNMP path ($SNMPDIR)
- Static ignored file systems (look for the @ignoreme array) – these will always be ignored (e.g. /cdrom)

Be SURE to run it with the –h option first, to understand the possible arguments that can be passed to it!

Running it with a capital –H will display additional information about the regular expressions that can be passed to it.

To use it, add something like this to your commands.cfg:
# 'check_disk' command definition for UNIX
# Warn at disk MB free < -w
define command{
command_name check_disk
command_line $USER1$/check_disk -t $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p $USER3$ -x $ARG3$ -i $ARG4$
}

NOTE: $USER3$ in that definition refers to your SNMP password in resource.cfg

And in services.cfg something like this:
define service{
use generic-service
hostgroup_name oracle-servers
service_description Oracle_disks
check_command check_disk!85%!95%!'^/'!'/u0/'
}

NOTE: This definition would monitor only partitions named /u0*. It would send warnings when the partition is above 85% full and critical alerts when greater than 95% full.

The attached picture shows examples of both the regular and the HTML output.