summaryrefslogtreecommitdiffstats
path: root/plugins-scripts
diff options
context:
space:
mode:
authorMarc Huffnagle <marc@huffnagle.net>2012-10-05 15:07:01 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2012-10-09 07:54:03 (GMT)
commit0656a0e284ed94f8c195592d62e9232e3c6d04b7 (patch)
treeaba8e79528c86d6aa1854ccff1d3211635484843 /plugins-scripts
parentb74543a61253d3cf6784e67d2f021d68eba53639 (diff)
downloadmonitoring-plugins-0656a0e284ed94f8c195592d62e9232e3c6d04b7.tar.gz
Added additional documentation to the check_range function
Diffstat (limited to 'plugins-scripts')
-rw-r--r--plugins-scripts/utils.sh.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins-scripts/utils.sh.in b/plugins-scripts/utils.sh.in
index 5fae6ad..4a07df8 100644
--- a/plugins-scripts/utils.sh.in
+++ b/plugins-scripts/utils.sh.in
@@ -23,7 +23,16 @@ support() {
23 23
24# 24#
25# check_range takes a value and a range string, returning successfully if an 25# check_range takes a value and a range string, returning successfully if an
26# alert should be raised based on the range. 26# alert should be raised based on the range. Range values are inclusive.
27# Values may be integers or floats.
28#
29# Example usage:
30#
31# Generating an exit code of 1:
32# check_range 5 2:8
33#
34# Generating an exit code of 0:
35# check_range 1 2:8
27# 36#
28check_range() { 37check_range() {
29 local v range yes no err decimal start end cmp match 38 local v range yes no err decimal start end cmp match