[Nagiosplug-devel] Issues on check_disk

Voon, Ton Ton.Voon at egg.com
Mon Jun 30 06:04:06 CEST 2003


The code for clearing thresholds is already there! Use -1% or -1:

$ ./check_disk -v -v -v -w 10% -c 5% -p /tmp -w 10000 -c 5000 -p /var
DISK OK [846 MB (85%) free on /var] [1886 MB (93%) free on /tmp]
846 of 992 MB (85%) free on /dev/dsk/c0t0d0s3 (type ufs mounted on /var)
warn:10000 crit:5000 warn%:10% crit%:5%
1886 of 2034 MB (93%) free on swap (type tmpfs mounted on /tmp) warn:-1
crit:-1 warn%:10% crit%:5%

$ ./check_disk -v -v -v -w 10% -c 5% -p /tmp -w 10000 -c 5000 -w -1% -c -1%
-p /var
DISK OK [846 MB (85%) free on /var] [1887 MB (93%) free on /tmp]
846 of 992 MB (85%) free on /dev/dsk/c0t0d0s3 (type ufs mounted on /var)
warn:10000 crit:5000 warn%:-1% crit%:-1%
1887 of 2035 MB (93%) free on swap (type tmpfs mounted on /tmp) warn:-1
crit:-1 warn%:10% crit%:5%

Looks like any values are accepted, but checked at the end of all parameter
parsing. It looks a nightmare to read though. Do you think it should be
something else (-w C -c C?)

Also, this currently does not work:

check_disk -w 10% -c 5% / /tmp /var

You need to specify as:

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

I think it makes sense to do it the top way, but check_disk looks like it is
expecting:

check_disk warn crit path

I seem to have broken this with my latest changes. Instead of fixing that,
can I propose removing warn and crit and assume all additional parameters to
check_disk are considered as paths?

Ton

> -----Original Message-----
> From:	Karl DeBisschop [SMTP:karl at debisschop.net]
> Sent:	Monday, June 30, 2003 12:45 PM
> To:	NagiosPlug Devel
> Subject:	[Nagiosplug-devel] Issues on check_disk
> 
> 1) there was a suggestion to use commas to allow pecifying multiple
> disks. 
> 
> I prefer spaces: check_disk -w 10% -c 5% / /tmp /var
> 
> Note that for this to work, we probably should not consider partition
> names differently from path names -- you ar definitely gaining gorund on
> that one, Ton.
> 
> This is also useful for defining one command that can be implemented by
> services with differing numbers of partitions to check.
> 
> My big aversion to commas, by the way, is that they can be part of a
> file/path name.
> 
> Of course, spaces can too - but we already need to deal with quoting
> spaces, I don't want to add another character that we need to handle in
> the same way.
> 
> 2) there was a suggsetion to use colons in path specs like: 
> check_disk -w 10% -c 5% -P /usr:5%:2%
> 
> The ':' is a legal part of a path on most/all OS's, certainly on POSIX,
> as is '%' -- in view of that , I see quoting problems.
> 
> I am movig toward Ton's picture of resetting things with '-C'. Actually,
> it would be more intuitive to me if we had a way to undef a threshold,
> and then say '-C' is a special case that undef's all thresholds. I
> suppose you could assert that nobody really wants to be warhed when
> there is truly zero space left, and use '0' or '0%' to reset, but then
> someone will pop up saying they do want zero. So I guess it would have
> to be a negaitve number. Which we could do, becuase we parse them as
> strings before converting to unsigned longs (I'm just going by memory on
> the type here, it's not really material)
> 


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.





More information about the Devel mailing list