[Nagiosplug-devel] Re: Issues on check_disk

Karl DeBisschop karl at debisschop.net
Tue Jul 1 07:55:07 CEST 2003


Voon, Ton writes: 

> Just so I get this clear before I start making changes, for the case: 
> 
> "warn 10% crit 5% for /tmp & /, warn 10MB crit 5MB for /var, everything else
> warn (20% or 10MB) crit (10% or 5MB)" 
> 
> I think the syntax should look like: 
> 
> check_disk -w 10% -c 5% -p /tmp -p / -C -w 10000 -c 5000 -p /var -w 20% -c
> 10%

Yes. Except the last pair of threshold do nothing because no disks follow 
them. 

I am starting with the rule that a threshold applies to all patrtitions that 
follow it. But, I feel this expected usage should also be vaild: 

 check_disk -p / -w 10% -c 5% 

So I modify the rule to add that a threshold applies to the preceding 
partitions if and only if they have not yet been set. Which I think means we 
need to mark a difference between initially unset thresholds, and thresholds 
that have been reset (say '-2'). 

There is also the oddity that this rule would mean 

 check_disk -p / -w 10% -c 5% -p /tmp -w 10000 -c 5000 

is exactly the same as

 check_disk -w 10% -c 5% -w 10000 -c 5000 -p / -p /tmp 

and 

 check_disk -p / -p /tmp -w 10% -c 5% -w 10000 -c 5000 

and of course 

 check_disk -w 10% -c 5% -w 10000 -c 5000 / /tmp 

> 
> The order is vital. Picturing the code, it maybe possible to add -p DEFAULT
> at the end of the above so 20% 10% is the default for everything else if you
> think this makes more sense. I can make sure it still works without it.

If I follow that idea, I don't think I want to go that way. 

 --
Karl 

> Ton 
> 
>> -----Original Message-----
>> From:	Karl DeBisschop [SMTP:karl at debisschop.net]
>> Sent:	Tuesday, July 01, 2003 11:52 AM
>> To:	Voon, Ton
>> Cc:	'NagiosPlug Devel'
>> Subject:	RE: [Nagiosplug-devel] Re: Issues on check_disk 
>> 
>> On Mon, 2003-06-30 at 13:04, Voon, Ton wrote:
>> > (Damn Outlook makes it hard for me to add comments inline - apologies
>> for
>> > appending at the top)
>> > 
>> > Karl,
>> > 
>> > -w -1% is fine for clearing thresholds. Just seemed like a lot of dashes
>> on
>> > the command line, but you're right - the alternatives are not much
>> better.
>> > 
>> > Fixed "check_disk warn crit [path]". This syntax had thresholds at used
>> > levels so I've left it like that, whereas the new code is reporting and
>> > expecting -w and -c on free levels so these two are equivalent:
>> > 
>> > check_disk -w 10% -c 5% -p /
>> > check_disk 90 95 /
>> > 
>> > Personally, I think it is a bit peculiar to support a syntax which is a
>> few
>> > releases old, especially as we are breaking more current syntax... 
>> 
>> I would propose that this syntax never be advertised. But to my mind,
>> retaining it does not seem to hurt. I am constantly surpirsed how old
>> some installs are, this constant dribble of 0.0.7 qustions... 
>> 
>> > The way it is currently coded, when -p is seen, it will "save" the last
>> set
>> > of thresholds specified. If a threshold is set after the path is
>> specified,
>> > then this will be ignored. At the moment, you can't say "check 5% for
>> /var
>> > and 10% for everything else" - you have to list "everything else". Is
>> this a
>> > limitation? 
>> 
>> I think so. 
>> 
>> >  If so, what syntax do you propose? Are you saying a later -w -c
>> > without a -p means "this threshold for everything else"?  
>> 
>> Instead of thinking of early thresholds as a 'default', we could think
>> of them as a state. So a threshold setting would apply to all partitions
>> before it with no threshold set, and all that follow until another
>> threshold is defined (or it is unset, of course). Does that make sense? 
>> 
>> I think it's not too hard to do with the code we currently have.  
>> 
>> > (All this syntax stuff is making me think that threshold parameter
>> should
>> > really be held as object variables. I think this is how Patrol does it
>> > (badly) - send all values back to the central server which then does the
>> > checking of thresholds)
>> > 
>> > Ton
>> >  
>> 
>  
> 
> 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 sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/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