summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fb54f25)
raw | patch | inline | side by side (parent: fb54f25)
author | Stanley Hopcroft <stanleyhopcroft@users.sourceforge.net> | |
Mon, 26 May 2003 10:09:23 +0000 (10:09 +0000) | ||
committer | Stanley Hopcroft <stanleyhopcroft@users.sourceforge.net> | |
Mon, 26 May 2003 10:09:23 +0000 (10:09 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@522 f882894a-f735-0410-b71e-b25c423dba1c
contrib/check_axis.sh | patch | blob | history | |
contrib/check_mssql.sh | patch | blob | history |
diff --git a/contrib/check_axis.sh b/contrib/check_axis.sh
index e97d4cd69286f8fbe43168d03b13c152a8385970..231d9da43d61cc4b6c2e8e3bcd1ebd2dd3ad04dc 100644 (file)
--- a/contrib/check_axis.sh
+++ b/contrib/check_axis.sh
exit="1" && stdio="WARNING - PRINTING. Out of paper.";
elif [ "$comments" == "Out of" ]; then
exit="1" && stdio="WARNING - PRINTING. Out of paper. Bytes printed: $bytes.";
+ elif [ "$comments" == "Busy Out" ]; then
+ exit="1" && stdio="WARNING - Busy, out of paper.";
elif [ "$comments" == "Ready " ]; then
exit="0" && stdio="OK - PRINTING. Bytes printed: $bytes.";
elif [ "$comments" == "Printer off-line" ]; then
diff --git a/contrib/check_mssql.sh b/contrib/check_mssql.sh
index 048da7205e948ff4615fdc6be22eed88d86ef437..7faa6beda10214ea63628658106e604ac32f2770 100755 (executable)
--- a/contrib/check_mssql.sh
+++ b/contrib/check_mssql.sh
#
# Version 1.0.
# Version 1.1: rewritten the initial script so that it not only works from the CLI but also from within Nagios. Always helpful...
+# Version 1.2: grouped output so things look a bit better.
#
# You might want to change these values:
wccmd=`which wc`
sedcmd=`which sed`
trcmd=`which tr`
+uniqcmd=`which uniq`
###################################################################################################################
exit 2;
else
nmbr=`$catcmd $resultfile | $grepcmd -v "\-\-\-\-\-" | $grepcmd -v "loginame" | $grepcmd -v "affected" | $sedcmd '/^$/d' | $sedcmd 's/ //g' | $wccmd -l | sed 's/ //g'`;
- users=`$catcmd $resultfile | $grepcmd -v "\-\-\-\-\-" | $grepcmd -v "loginame" | $grepcmd -v "affected" | $sedcmd '/^$/d' | $sedcmd 's/ //g' | $trcmd \\\n , | $sedcmd 's/,$/./g' | $sedcmd 's/,/, /g'`;
+ users=`$catcmd $resultfile | $grepcmd -v "\-\-\-\-\-" | $grepcmd -v "loginame" | $grepcmd -v "affected" | $sedcmd '/^$/d' | $sedcmd 's/ //g' | $uniqcmd -c | $trcmd \\\n , | $sedcmd 's/,$/./g' | $sedcmd 's/,/, /g' | $sedcmd 's/ //g' | $trcmd \\\t " "`;
$rmcmd -f $tmpfile $resultfile;
echo "OK - MS SQL Server $srv has $nmbr user(s) connected: $users" | sed 's/: $/./g';
exit 0;