From 4937e2a5e0be4518ea4b6001861cf6b4897f6b2b Mon Sep 17 00:00:00 2001 From: Elyrith Date: Thu, 29 Nov 2012 20:43:49 -0500 Subject: [PATCH 1/2] Added PERFDATA to put Nagios Performance Data when viewing service details. --- check_gputemp.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/check_gputemp.sh b/check_gputemp.sh index 1f4f369..d92bb42 100755 --- a/check_gputemp.sh +++ b/check_gputemp.sh @@ -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 From c9db6091a4bf16cde1189e454320118440090fc5 Mon Sep 17 00:00:00 2001 From: Elyrith Date: Thu, 29 Nov 2012 20:45:33 -0500 Subject: [PATCH 2/2] Grammar stuff --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 6588e33..6e0a3eb 100644 --- a/README +++ b/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.