question

Jeff McKeon jsm at inpro.net
Thu Dec 12 20:44:32 CET 2002


That looks like it will do the trick!!!

Thanks Benny!!!!

On Thu, 2002-12-12 at 14:29, C. Bensend wrote:
> On Thu, Dec 12, 2002 at 02:04:10PM -0500, Jeff McKeon wrote:
> > 
> > the plugin actually just needs to monitor the number of files in a
> > directory.  This might also be good for seeing when log files pile up or
> > anything of that nature.
> 
> Hey folks,
> 
> 	Actually, I wrote my own for just this sort of
> situation.  I use it via check_by_ssh to monitor a mail
> queue.
> 
> 	It is not _good_ code, nor is it technically
> correct, but it works for me.  And you're welcome to it,
> if you like.
> 
> Benny
> 
> 
> #!/usr/bin/sh
> 
> numqueued=`/bin/ls -1 /var/spool/mqueue/q* | wc -l`
> 
> # Adjust as necessary
> # We go CRITICAL at 300 mesages, WARNING at 150
> 
> if [ $numqueued -ge 300 ]; then
> 	echo "CRITICAL: $numqueued emails in queue."
> 	exit 2;
> fi
> 
> if [ $numqueued -ge 150 ]; then
> 	echo "WARNING: $numqueued emails in queue."
> 	exit 1;
> fi
> 
> echo "OK: $numqueued emails in queue."
> exit 0;
> 
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> "Oh."   --- The Green Goblin, in "Spider-Man"
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:
> With Great Power, Comes Great Responsibility 
> Learn to use your power at OSDN's High Performance Computing Channel
> http://hpc.devchannel.org/
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users




-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/




More information about the Users mailing list