[Nagiosplug-devel] New check_procs design (was: New plugins, autoconf & pre-built bi naries)

Karl DeBisschop karl at debisschop.net
Thu Apr 3 03:54:59 CEST 2003


On Thu, 2003-04-03 at 04:48, Voon, Ton wrote:
> I find that if I can see what the syntax will be, I can almost see the code
> in my head. My head is a wierd place, but it's home :-)
> 
> One limitation of your example is: what about critical for vsz > 10K, but
> warn if vsz > 5K? Your example would normalize everything down to number of
> processes. 

Put quite clearly, I knew something was awkward, and you've nailed it.
Thanks.

(BTW -- you could run two checks:
  check_procs -w 1: -c 1: --test "VSZ -gt 10000"
  check_procs -w 1: -c 20: --test "VSZ -gt 5000"
 but that's pretty klugy)

> I can see two ways round:
> 1) a --metric flag so that the metric returned is # of processes, %cpu, vsz,
> etc
> 2) threshold metric based on calling program name (check_procs returns
> processes, check_procs_cpu returns %cpu)

I prefer a --metric flag and a single name for the plugin

> I guess output would also be different based on the metric, so the general
> output is:
> {CRITICAL|WARNING|OK}: {process names that fail thresholds (value of metric
> used)}

or "%s %s: <count of processes that fail filter>", metric, state_text

This extends current sysntax if one metric is PROCS.

List of process names that fail does not make sense to me if using
--metric PROCS (if there's 100 processes anf the limit is 50, which 50
caused it to fail?).

But the list may be a good feature to enable with a -v switch (I have
started using levels of verbosity, so one '-v' could triger this detail,
and two would be required to make multiline debugging info). It also
makes sense for this to be verbose because I want to try and assure that
non-verbose invacations cannot overfill the 360? characters of the input
buffer in nagios. This type of listing could easily do that.

> As for the actual work, I can do the configure.in stuff and merging the
> current OR filters, but I don't think I can handle the new-style filters.

My vote is merge with filters. (would you be adding the --metric?). Then
one of us (me unless someone else jumps) will extend to add new-style
filters. We have some time, as there is not release date set.

> Besides, my baby is due next week so I can't see much time ahead...

After the 1st, I found I still had some time, With the 2nd, I had quite
a bit of time during paternity leave, but not much after that. I have
not had free time at all since the 3rd came.

--
Karl

> Ton
> 
> > -----Original Message-----
> > From:	Karl DeBisschop [SMTP:karl at debisschop.net]
> > Sent:	Wednesday, April 02, 2003 1:33 AM
> > To:	NagiosPlug Devel
> > Subject:	Re: [Nagiosplug-devel] New plugins, autoconf & pre-built
> > binaries
> > 
> > On Tue, 2003-04-01 at 17:45, Ton Voon wrote:
> > > Good idea re: AND and OR option in filters.
> > > 
> > > I see where you are going with this (run a huge ps command and then run 
> > > a db-like query on results), but what would the syntax look like?
> > 
> > I dn't really know, but I do think getting the syntax 'right' may be
> > fully as hard as the coding.
> > 
> > I have in mind right now a syntax sort of like POSIC 'test'
> > 
> > check_procs --test (VSZ -gt 100 -o SIZE -gt 100) -a STATE -eq Z -a UID
> > -eq 500 -w 5: -c 10:
> > 
> > But that's only what comes to mind at the moment. I suspect there are
> > better solutions that I'm not imaginative enough to think of.
> > 
> > --
> > Karl
> > 
> 
> 
> This private and confidential e-mail has been sent to you by Egg.
> The Egg group of companies includes Egg Banking plc
> (registered no. 2999842), Egg Financial Products Ltd (registered
> no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
> carries out investment business on behalf of Egg and is regulated
> by the Financial Services Authority.  
> Registered in England and Wales. Registered offices: 1 Waterhouse Square,
> 138-142 Holborn, London EC1N 2NA.
> If you are not the intended recipient of this e-mail and have
> received it in error, please notify the sender by replying with
> 'received in error' as the subject and then delete it from your
> mailbox.
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb: 
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> Nagiosplug-devel mailing list
> Nagiosplug-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
> ::: Please include plugins version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null





More information about the Devel mailing list