We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
You put Critical in front of perfdata, too: FreeSize_Volume-1=CRITICAL: 8%;20;10;0;100
# '/srv/icinga/linux/check_qnap3' '-H' 'qnap' '-c' '10' '-p' 'volstatus' '-w' '20' Volume #1: OK: Ready, Total Size (bytes): 1.81 TB, Free: 152.02 GB (CRITICAL: 8%), Volume #2: OK: Ready, Total Size (bytes): 1.81 TB, Free: 149.36 GB (CRITICAL: 8%)|FreeSize_Volume-1=CRITICAL: 8%;20;10;0;100 FreeSize_Volume-2=CRITICAL: 8%;20;10;0;100
With this changes it works:
I change VOLPCT to VOLPCTM for Output and left VOLPCT for prefdata.
if [ "$VOLPCT" -le "$strCritical" ]; then VOLPCTM="CRITICAL: $VOLPCT" CRITICAL=1 elif [ "$VOLPCT" -le "$strWarning" ]; then VOLPCTM="WARNING: $VOLPCT" WARNING=1 fi if [ "$VOL" -lt "$VOLCOUNT" ]; then ALLOUTPUT="${ALLOUTPUT}Volume #${VOL}: $VOLSTAT, Total Size (bytes): $VOLCAPACITY $UNITtest, Free: $VOLFREESIZE $UNITtest2 (${VOLPCTM}%), " else ALLOUTPUT="${ALLOUTPUT}Volume #${VOL}: $VOLSTAT, Total Size (bytes): $VOLCAPACITY $UNITtest, Free: $VOLFREESIZE $UNITtest2 (${VOLPCTM}%)" fi
# '/srv/icinga/linux/check_qnap3' '-H' 'qnap' '-c' '10' '-p' 'volstatus' '-w' '20' Volume #1: OK: Ready, Total Size (bytes): 1.81 TB, Free: 152.02 GB (CRITICAL: 8%), Volume #2: OK: Ready, Total Size (bytes): 1.81 TB, Free: 149.34 GB (CRITICAL: 8%)|FreeSize_Volume-1=8%;20;10;0;100 FreeSize_Volume-2=8%;20;10;0;100
The text was updated successfully, but these errors were encountered:
My solution is wrong. You have only to change the position of the code:
#Performance Data if [ $VOL -gt 1 ]; then PERFOUTPUT=$PERFOUTPUT" " fi PERFOUTPUT=$PERFOUTPUT"FreeSize_Volume-$VOL=${VOLPCT}%;$strWarning;$strCritical;0;100" if [ "$VOLPCT" -le "$strCritical" ]; then VOLPCT="CRITICAL: $VOLPCT" CRITICAL=1 elif [ "$VOLPCT" -le "$strWarning" ]; then VOLPCT="WARNING: $VOLPCT" WARNING=1 fi if [ "$VOL" -lt "$VOLCOUNT" ]; then ALLOUTPUT="${ALLOUTPUT}Volume #${VOL}: $VOLSTAT, Total Size (bytes): $VOLCAPACITY $UNITtest, Free: $VOLFREESIZE $UNITtest2 (${VOLPCT}%), " else ALLOUTPUT="${ALLOUTPUT}Volume #${VOL}: $VOLSTAT, Total Size (bytes): $VOLCAPACITY $UNITtest, Free: $VOLFREESIZE $UNITtest2 (${VOLPCT}%)" fi
Sorry, something went wrong.
No branches or pull requests
You put Critical in front of perfdata, too:
FreeSize_Volume-1=CRITICAL: 8%;20;10;0;100
With this changes it works:
I change VOLPCT to VOLPCTM for Output and left VOLPCT for prefdata.
The text was updated successfully, but these errors were encountered: