Build precise queries to find exactly what you need
Press ESC to close
I made it compatible with POSIX-conformant sh. Is any license condition on redistributing the modified code? The change set as follows.
— check_cpu_stats.orig 2014-02-06 11:28:47.000000000 +0900 +++ check_cpu_stats 2014-02-06 11:29:59.509817215 +0900 @@ -1,4 +1,4 @@ -#!/bin/ksh +#!/bin/sh # ============================================================================== # CPU Utilization Statistics plugin for Nagios # @@ -163,7 +163,7 @@
# List to Table for warning threshold (compatibility with -set +A TAB_WARNING_THRESHOLD `echo $LIST_WARNING_THRESHOLD | sed ‘s/,/ /g’` +TAB_WARNING_THRESHOLD=( `echo $LIST_WARNING_THRESHOLD | sed ‘s/,/ /g’` ) if [ “${#TAB_WARNING_THRESHOLD[@]}” -ne “3” ]; then echo “ERROR : Bad count parameter in Warning Threshold” exit $STATE_WARNING @@ -174,7 +174,7 @@ fi
# List to Table for critical threshold -set +A TAB_CRITICAL_THRESHOLD `echo $LIST_CRITICAL_THRESHOLD | sed ‘s/,/ /g’` +TAB_CRITICAL_THRESHOLD=( `echo $LIST_CRITICAL_THRESHOLD | sed ‘s/,/ /g’` ) if [ “${#TAB_CRITICAL_THRESHOLD[@]}” -ne “3” ]; then echo “ERROR : Bad count parameter in CRITICAL Threshold” exit $STATE_WARNING
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!