Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
This PHP Nagios plugin automaticly detects all disks/partitions of a Windows or Linux operating system and checks the free space. You don't need a check for every disk and just can use this check that'll return all available disks on the system. If a system gets a new partition you don't need to change your check. The plugin also returns performance data and you can exclude disks that you don't want to check.
Current Version
1.1
Last Release Date
2014-04-30
Owner
Klement
Website
http://usolved.net
Download URL
https://github.com/usolved/check_usolved_disks
License
GPL
Compatible With
You can download the latest version and see the full documentation on GitHub.
----------------------------------------------------------
INSTALLATION:
Just copy the file check_usolved_disks.php into your Nagios plugin directory. For example into the path /usr/local/nagios/libexec/
Add execution permission for the nagios user on check_usolved_disks.php. If you have at least PHP 5 this plugin should run out-of-the-box.
Make sure to have the PHP SNMP module installed and enabled in your php.ini.
> apt-get install php5-snmp (Ubuntu, Debian, ...) or > yum install php-snmp (RedHat, CentOS, ...)
USAGE:
If you are in the Nagios plugin directory execute this command:
./check_usolved_disks.php -H localhost -C public -w 90 -c 95
The output should look like this on a Linux machine:
Disks OK // / (37%), /boot (30%), /dev/shm (0%) / - Size: 50.61 GB / Used: 18.73 GB (37% used) /boot - Size: 0.1 GB / Used: 0.03 GB (30% used) /dev/shm - Size: 2.91 GB / Used: 0 GB (0% used)
On a Windows machine the output could look something like this:
Disks OK // C: (20.5%), D: (87.8%) C: - Size: 59.66 GB / Used: 12.24 GB (20.5% used) D: - Size: 80 GB / Used: 70.22 GB (87.8% used)
ARGUMENTS:
-H (host address) Give the host address with the IP address or FQDN
-C (snmp community) Give the SNMP Community String
-w (warn) Warning treshold in percent
-c (crit) Critical treshold in percent
[-V (snmp version)] Optional: SNMP version 1 or 2c are supported, if argument not given version 1 is used by default
[-P (perfdata)] Optional: Give 'yes' as argument if you wish performace data output
[-E '(exclude partitions)'] Optional: Exclude partitions with a comma separated list on Windows like 'D:,E:' (with or without colon) or on Linux '/var,/tmp'
I get -bash: ./check_usolved_disks.php: /usr/bin/php^M: bad interpreter: No such file or directory I am new to this so any help would be appreciated.
You somehow managed to save the file with windows line endings. If you download the raw file from GitHub it will work. So not an issue with the plugin itself :). Here are some solutions if you want to change the line endings with several tools on your existing file: http://stackoverflow.com/questions/14219092/bash-my-script-bin-bashm-bad-interpreter-no-such-file-or-directory
I am running it on a Ubuntu server with php5. ./check_usolved_disks.php -H 10.2.1.11 -C public -w 90 -c 95 returns nothing, no error, no output at all.
If there's no output, then the php5 snmp extension is missing on your installation (on the latest version of the plugin there's also a check if the snmp extension is available with an output). Please check if the extension is properly installed and activated in your php.ini. To install the module on Ubuntu use: apt-get install php5-snmp On distributions like RedHat use: yum install php-snmp
You must be logged in to submit a review.
To:
From: