check_glusterfs plugin error
Posted: Tue Nov 29, 2016 5:54 am
Hi,
I am trying to monitor glusterfs volumes by check_glusterfs nagios plugin, I have downloaded the plugin from https://exchange.nagios.org/directory/P ... ks/details site.
When I am trying to execute the plugin, I am getting below error.
when I tried with debugging the script, I got the followings:
Can someone please help me to resolve the issue..?
Thanks,
Sachikanta
I am trying to monitor glusterfs volumes by check_glusterfs nagios plugin, I have downloaded the plugin from https://exchange.nagios.org/directory/P ... ks/details site.
When I am trying to execute the plugin, I am getting below error.
Code: Select all
[b][root@server01 libexec]#[/b] ./check_glusterfs -v VOL01 -n 2
./check_glusterfs: line 111: -2: substring expression < 0
WARNING: 27 unsynched entries; found 1 bricks, expected 2
Code: Select all
[b][root@server01 libexec]#[/b] sh -x check_glusterfs -v VOL01 -n 2
+ PATH=/sbin:/bin:/usr/sbin:/usr/bin
++ basename -- check_glusterfs
+ PROGNAME=check_glusterfs
++ echo check_glusterfs
++ sed -e 's,[\/][^\/][^\/]*$,,'
+ PROGPATH=check_glusterfs
+ REVISION=1.0.1
+ . /usr/local/nagios/libexec/utils.sh
++ STATE_OK=0
++ STATE_WARNING=1
++ STATE_CRITICAL=2
++ STATE_UNKNOWN=3
++ STATE_DEPENDENT=4
+ getopts v:n:w:c: opt
+ case $opt in
+ VOLUME=VOL01
+ getopts v:n:w:c: opt
+ case $opt in
+ BRICKS=2
+ getopts v:n:w:c: opt
+ '[' -z VOL01 -o -z 2 ']'
+ for cmd in basename bc awk sudo pidof gluster
+ type -p basename
+ for cmd in basename bc awk sudo pidof gluster
+ type -p bc
+ for cmd in basename bc awk sudo pidof gluster
+ type -p awk
+ for cmd in basename bc awk sudo pidof gluster
+ type -p sudo
+ for cmd in basename bc awk sudo pidof gluster
+ type -p pidof
+ for cmd in basename bc awk sudo pidof gluster
+ type -p gluster
+ pidof glusterd
+ pidof glusterfsd
+ heal=0
++ awk '/^Number of entries: /{print $4}'
++ sudo gluster volume heal VOL01 info
+ for entries in '$(sudo gluster volume heal ${VOLUME} info | awk '\''/^Number of entries: /{print $4}'\'')'
+ '[' 17 -gt 0 ']'
+ let 17
+ for entries in '$(sudo gluster volume heal ${VOLUME} info | awk '\''/^Number of entries: /{print $4}'\'')'
+ '[' 10 -gt 0 ']'
+ let 27
+ '[' 27 -gt 0 ']'
+ errors=("${errors[@]}" "$heal unsynched entries")
+ bricksfound=0
+ freegb=9999999
+ shopt -s nullglob
check_glusterfs: line 136: syntax error near unexpected token `<'
check_glusterfs: line 136: `done < <(sudo gluster volume status ${VOLUME} detail)'
Thanks,
Sachikanta