Commit 3c5b1219 authored by Sebastian Thorarensen's avatar Sebastian Thorarensen
Browse files

check_lysrdiff: Synchronize with Puppet repo

parent 9305c383
#!/bin/sh
#
# This check script is maintained in a Subversion repository at
# http://lsvn.lysator.liu.se/svnroot/nagios-plugins. Contact
# This check script is maintained in a Git repository at
# https://git.lysator.liu.se/lysator/nagios-plugins. Contact
# <ceder@lysator.liu.se> for commit access.
activity=26
stale=40
stale=120
usage () {
echo $0: usage: $0 '[ opt ] diskno partno' >&2
......@@ -119,8 +119,8 @@ then
fi
( sed -n 's/--fail$//p' $state; sed 's/--start$//' $state-stale; ) \
|awk 'BEGIN { sz = 0 }
NR > 1 && sz < 198 { printf ","; sz += 2 }
sz < 200 { printf " %s", $3; sz += length($3) }
NR > 1 && sz < 198 { printf ", "; sz += 2 }
sz < 200 { printf "%s", $3; sz += length($3) }
END { if (sz >= 200) printf ", others" } ' \
|sed s'/, \([^,]*\)$/ and \1/'
echo '. | activity='$ACTIVITY stale=$STALE failed=$FAILED
......@@ -138,8 +138,8 @@ then
echo -n ": "
sed -n 's/--fail$//p' $state \
|awk 'BEGIN { sz = 0 }
NR > 1 && sz < 198 { printf ","; sz += 2 }
sz < 200 { printf " %s", $3; sz += length($3) }
NR > 1 && sz < 198 { printf ", "; sz += 2 }
sz < 200 { printf "%s", $3; sz += length($3) }
END { if (sz >= 200) printf ", others" } ' \
|sed s'/, \([^,]*\)$/ and \1/'
echo '. | activity='$ACTIVITY stale=$STALE failed=$FAILED
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment