[Nagiosplug-checkins] CVS: nagiosplug/contrib check_axis.sh,1.1,1.2 check_mssql.sh,1.1,1.2

Stanley Hopcroft stanleyhopcroft at users.sourceforge.net
Mon May 26 03:10:02 CEST 2003


Update of /cvsroot/nagiosplug/nagiosplug/contrib
In directory sc8-pr-cvs1:/tmp/cvs-serv6573/contrib

Modified Files:
	check_axis.sh check_mssql.sh 
Log Message:
Revisions to Tom De Blende contributed plugins: check_axis.sh and check_mssql.sh

Index: check_axis.sh
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/contrib/check_axis.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** check_axis.sh	8 Apr 2003 00:00:39 -0000	1.1
--- check_axis.sh	26 May 2003 10:09:23 -0000	1.2
***************
*** 72,75 ****
--- 72,77 ----
          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.";        

Index: check_mssql.sh
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/contrib/check_mssql.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** check_mssql.sh	13 May 2003 12:13:05 -0000	1.1
--- check_mssql.sh	26 May 2003 10:09:23 -0000	1.2
***************
*** 11,14 ****
--- 11,15 ----
  # 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:
***************
*** 22,25 ****
--- 23,27 ----
  sedcmd=`which sed`
  trcmd=`which tr`
+ uniqcmd=`which uniq`
  
  ###################################################################################################################
***************
*** 69,73 ****
  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'`;
          $rmcmd -f $tmpfile $resultfile;
          echo "OK - MS SQL Server $srv has $nmbr user(s) connected: $users" | sed 's/: $/./g';
--- 71,75 ----
  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' | $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';





More information about the Commits mailing list