[Nagiosplug-devel] RE: Issues on check_disk
Ton.Voon at egg.com
Wed Jul 2 02:37:05 CEST 2003
I've been trying to get my head round this and I think it comes to this:
We currently have check_disk with multiple thresholds, with thresholds read
via a "left to right" scheme (eg, "check_disk -w 10% -c 5% -p /tmp").
There are 2 desireable improvements:
1) backward syntax compatibility, eg "check_disk -p /tmp -w 10% -c 5%"
should set thresholds of 10%,5% for /tmp. This would effectively mean that
the thresholds could be read "bidirectionally"
2) a method of saying "check /tmp at 10%, 5% with 20%, 15% for everything
I think there are 3 roads to go down:
A) Not bother with (1), but implement (2). This would allow us to use
"check_disk -w 10% -c 5% -p /tmp -w 20% -c 15%" so a threshold without a
path following is considered for everything else. This does not break the
"left to right" methodology and seems a logical extension of r1.3 syntax of
"check_disk -w 20% -c 15%".
B) Implement (1), but not (2). Because you can read thresholds
"bidirectionally", it is not possible to set a threshold for everything
C) Do (1) and (2) by using "-p default". As the optarg to -p is a path, only
the namespace beginning with "/" is used, so we could use labels such as
"default" as the threshold for everything else. However, Karl has expressed
a dislike of this approach.
My vote is for (A). We are breaking current syntax (-p "/var /tmp" will not
work anymore) so as long as we issue clear guidance on how the current
syntax works, people can make their changes accordingly - currently,
"check_disk -p /tmp -w 10% -c 5%" will give a UNKNOWN status since the
syntax is wrong. I think the functionality of (2) is a lot more desireable
> -----Original Message-----
> From: Karl DeBisschop [SMTP:karl at debisschop.net]
> Sent: Tuesday, July 01, 2003 2:53 PM
> To: Voon, Ton
> Cc: 'Karl DeBisschop'; 'NagiosPlug Devel'
> Subject: Re: Issues on check_disk
> 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
> > 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%
> > 10%
> Yes. Except the last pair of threshold do nothing because no disks follow
> I am starting with the rule that a threshold applies to all patrtitions
> 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
> need to mark a difference between initially unset thresholds, and
> 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
> 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
> > at the end of the above so 20% 10% is the default for everything else if
> > 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.
> > 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
> >> 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
> >> > levels so I've left it like that, whereas the new code is reporting
> >> > 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
> >> 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
> >> 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
> >> 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
> >> > (badly) - send all values back to the central server which then does
> >> > 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
More information about the Devel