File System

GlusterFS checks

Description:

Checks GlusterFS health on the server. Tests include:
– daemons running
– number of bricks online
– disk space
– healing status

Current Version

1.0.0

Last Release Date

2013-12-03

Compatible With

  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios XI
  • Nagios Fusion
  • Nagios Reactor

Owner

License

BSD


Project Files
Project Notes
Checks GlusterFS health on the server. Tests include: - daemons running - number of bricks online - disk space - healing status Needs some sudo rights: Defaults:nagios !requiretty nagios ALL=(root) NOPASSWD:/usr/sbin/gluster volume status [[:graph:]]* detail,/usr/sbin/gluster volume heal [[:graph:]]* info Inspired by a script of Mark Nipper. Tested on GlusterFS 3.4.1 - feedback welcome
Reviews (6) Add a Review
re:where is util.sh script
by sdbhabal, July 31, 2017

@call_krushna, You need to run this script from your Nagios libexec directory. For my example, it is /usr/local/nagios/libexec



missing utils.sh
by witkacy26, March 31, 2016

You can find missing utils.sh there: http://n2rrd-wiki.diglinks.com/display/n2rrd/utils.sh #! /bin/sh STATE_OK=0 STATE_WARNING=1 STATE_CRITICAL=2 STATE_UNKNOWN=3 STATE_DEPENDENT=4 if test -x /usr/bin/printf; then ECHO=/usr/bin/printf else ECHO=echo fi print_revision() { echo "$1 v$2 (nagios-plugins 1.4.13)" $ECHO "The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistributencopies of the plugins under the terms of the GNU General Public License.nFor more information about these matters, see the file named COPYING.n" | sed -e 's/n/ /g' } support() { $ECHO "Send email to nagios-users@lists.sourceforge.net if you have questionsnregarding use of this software. To submit patches or suggest improvements,nsend email to nagiosplug-devel@lists.sourceforge.net.nPlease include version information with all correspondence (when possible,nuse output from the --version option of the plugin itself).n" | sed -e 's/n/ /g' }



Great work!
by maticue, June 30, 2015

We had to change only one thing: Before: free=${freeunit:0:-2} Returns the following error: "line 101: -2: substring expression Molina:



works very well
by halfinhalfout, July 31, 2014

This works very well for me. I've created a github repo for this at https://github.com/customink/nagios-nrpe-check_glusterfs I've checked in carrillm's mod to support TB sized gluster volumes, and an additional mod to output all errors on a critical alarm, not just free space. That way a lack of free space alert won't hide the fact that you're volume has bricks in a healing state, for instance. Feel free to submit pull requests via git. Thanks for the great work, Mark. Doug (halfinhalfout)



Very Good script
by carrillm, June 30, 2014

I tested with gluster 3.4.2 and it's working very well i just modificate the script to manage TB volume with freespace on TB : so on disk part of script replace this: Disk) key=${field[@]:0:3} if [ "${key}" = "Disk Space Free" ]; then freeunit=${field[@]:4} free=${freeunit:0:-2} unit=${freeunit#$free} if [ "$unit" != "GB" ]; then Exit UNKNOWN "unknown disk space size $freeunit" fi free=$(echo "${free} / 1" | bc -q) if [ $free -lt $freegb ]; then freegb=$free fi fi ;; by this : Disk) key=${field[@]:0:3} if [ "${key}" = "Disk Space Free" ]; then freeunit=${field[@]:4} free=${freeunit:0:-2} freeconvgb=`echo "($free*1024)" | bc` unit=${freeunit#$free} if [ "$unit" = "TB" ]; then free=$freeconvgb unit="GB" fi if [ "$unit" != "GB" ]; then Exit UNKNOWN "unknown disk space size $freeunit" fi free=$(echo "${free} / 1" | bc -q) if [ $free -lt $freegb ]; then freegb=$free fi fi ;; Thanks a lot



where is util.sh script
by call_krushna, June 30, 2014

I am getting below error while running the script . ./check_glusterfs -v testvolume -n 2 ./check_glusterfs: line 27: ./utils.sh: No such file or directory ./check_glusterfs: line 54: CRITICAL: no bricks found: command not found Thanks and regards



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4.5 (11)
Favorites
2
Views
51,656