[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mon
Subject:    Another patch for netappfree.monitor
From:       Theo Van Dinter <felicity () kluge ! net>
Date:       2001-08-03 23:42:42
[Download RAW message or body]

Hi folks,

Sorry to have to send out a second patch for netappfree.monitor.  On the
way home this evening, I was thinking that since the alert statement for
the netappfree monitor probably has "alertevery ... summary" (since the
body changes with disk usage), the summary needs to have both host and
filesystem instead of just the host.  Otherwise, if a second filesystem
fills up on a filer that has already generated an alert, the second
filesystem won't be reported until the "alertevery" period has passed.

So, I've attached a small patch (it's only 2 lines) which fixes this problem.
The patch is against my version of netappfree.monitor (the one generated via
the first patch I sent out today.)

-- 
Randomly Generated Tagline:
"Good judgment comes from bad experience, and a lot of that comes from
 bad judgment." - Zen Musings


*** netappfree.monitor	2001/08/03 15:02:49	1.3
--- netappfree.monitor	2001/08/03 23:33:54
***************
*** 12,18 ****
  # more error checking, etc.  Can be used in conjunction with
  # snapdelete.alert to auto-remove snapshots if needed.
  #
! # $Id: netappfree.monitor,v 1.3 2001/08/03 15:02:49 tvd Stab $
  #
  #
  #    Copyright (C) 1998, Jim Trocki
--- 12,18 ----
  # more error checking, etc.  Can be used in conjunction with
  # snapdelete.alert to auto-remove snapshots if needed.
  #
! # $Id: netappfree.monitor,v 1.4 2001/08/03 23:33:30 tvd Stab $
  #
  #
  #    Copyright (C) 1998, Jim Trocki
***************
*** 92,98 ****
  	last if ($v->[$dfIndex]->tag !~ /dfIndex/);
  
  	if ($v->[$dfKBytesAvail]->val < $FREE{$host}{$v->[$dfFileSys]->val}) {
! 	    $HOSTS{$host} ++;
  	    push (@ERRS, sprintf ("%1.1fGB free on %s:%s",
  	    	$v->[$dfKBytesAvail]->val / 1024 / 1024,
  		$host, $v->[$dfFileSys]->val));
--- 92,98 ----
  	last if ($v->[$dfIndex]->tag !~ /dfIndex/);
  
  	if ($v->[$dfKBytesAvail]->val < $FREE{$host}{$v->[$dfFileSys]->val}) {
! 	    $HOSTS{"$host:".$v->[$dfFileSys]->val} ++;
  	    push (@ERRS, sprintf ("%1.1fGB free on %s:%s",
  	    	$v->[$dfKBytesAvail]->val / 1024 / 1024,
  		$host, $v->[$dfFileSys]->val));
***************
*** 108,114 ****
  }
  
  
! print join(" ",keys %HOSTS),"\n","\n",join("\n", @ERRS), "\n" if ($RET);
  
  exit $RET;
  
--- 108,114 ----
  }
  
  
! print join(" ",sort keys %HOSTS),"\n","\n",join("\n", @ERRS), "\n" if ($RET);
  
  exit $RET;
  


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic