Merged in elyrith/check_gputemp (pull request #1)
This commit is contained in:
commit
d73db26ece
2
README
2
README
@ -15,5 +15,5 @@ This plugin is based on check_temp which I wrote earlier this year. The code is
|
||||
almost identical to it. Many thanks to Chad Columbus who sent me
|
||||
bugfixes and corrections for check_temp. Without check_temp their would never
|
||||
have been check_gputemp.
|
||||
The plugin were submitted to Nagios Exchange in january 2012.
|
||||
This plugin was submitted to Nagios Exchange in January 2012.
|
||||
|
||||
|
@ -216,21 +216,23 @@ ${SENSORPROG} --adapter=${adapter} --od-gettemperature | grep "Temperature"
|
||||
printf "\n\n"
|
||||
fi
|
||||
|
||||
# Get performance data for Nagios "Performance Data" field
|
||||
PERFDATA=`${SENSORPROG} --adapter=${adapter} --od-gettemperature | grep "Temperature"`
|
||||
|
||||
# And finally check the temperature against our thresholds
|
||||
if [[ "$TEMP" -gt "$thresh_crit" ]]; then
|
||||
# Temperature is above critical threshold
|
||||
echo "GPU $adapter CRITICAL - Temperature is $TEMP"
|
||||
echo "GPU $adapter CRITICAL - Temperature is $TEMP | $PERFDATA"
|
||||
exit $STATE_CRITICAL
|
||||
|
||||
elif [[ "$TEMP" -gt "$thresh_warn" ]]; then
|
||||
# Temperature is above warning threshold
|
||||
echo "GPU $adapter WARNING - Temperature is $TEMP"
|
||||
echo "GPU $adapter WARNING - Temperature is $TEMP | $PERFDATA"
|
||||
exit $STATE_WARNING
|
||||
|
||||
else
|
||||
# Temperature is ok
|
||||
echo "GPU $adapter OK - Temperature is $TEMP"
|
||||
echo "GPU $adapter OK - Temperature is $TEMP | $PERFDATA"
|
||||
exit $STATE_OK
|
||||
fi
|
||||
exit 3
|
||||
|
Loading…
x
Reference in New Issue
Block a user