Xymon Mailing List Archive search

4.2-alpha - disk tests

6 messages in this thread

list Chris Morris · Mon, 10 Apr 2006 16:00:34 +0100 ·
Henrik,

Looking at the code in client-config.c module, it looks like the ability to
test filesystems for absolute block, Kb, Mb or Gb limits rather that just
%Used is already there, but the hobbit-client.cfg file does not explain how
to code these tests.

Am I correct, or just don't understand C? 

Regards,

Chris


****************************************************************************
The information contained in this email is intended only for the use of the intended recipient at the email address to which it has been addressed. If the reader of this message is not an intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination or copying of the message or associated attachments is strictly prohibited.

If you have received this email in error, please contact the sender by return email or call 01793 877777 and ask for the sender and then delete it immediately from your system.Please note that neither RWE npower nor the sender accepts any responsibility for viruses and it is your responsibility to scan attachments (if any).
*****************************************************************************
list Henrik Størner · Mon, 10 Apr 2006 17:43:01 +0200 ·
quoted from Chris Morris
On Mon, Apr 10, 2006 at 04:00:34PM +0100, Morris, Chris (Shared Services) wrote:
Henrik,

Looking at the code in client-config.c module, it looks like the ability to
test filesystems for absolute block, Kb, Mb or Gb limits rather that just
%Used is already there, but the hobbit-client.cfg file does not explain how
to code these tests.

Am I correct, or just don't understand C? 
You're reading the code correctly. The problem is you cannot configure
it currently.

The problem I ran into is that I haven't found a way of detecting what
metric is reported in the "df" output that the client reports. Here's 
an example:

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda2             99511580  11417684  88093896  12% /

Now, it's ease to figure out that there's 12% used on my / filesystem;
even without the "Use%" column, I could just calculate 
   (100 x 11417684) / 99511580 = 12

But how can I tell what metric is used for "99511580" and "11417684" ?
The heading does say "1K-blocks", but that varies quite a bit between
the operating systems. At worst, it could be "disk blocks" - often 512
bytes, but one never knows.

Configuring a limit of "yellow at 2 GB free" requires that Hobbit can
interpret the absolute values reported by the client, not just the
relative amount of free space. I don't know if there's a good way of
doing that, except to embed (more) knowledge about the various df's
into Hobbit. And I'm not terribly keen on doing that.


Henrik
list Roberto Tagliaferri · Mon, 10 Apr 2006 18:24:45 +0200 ·
quoted from Henrik Størner
Henrik Stoerner ha scritto:

You're reading the code correctly. The problem is you cannot configure
it currently.

The problem I ran into is that I haven't found a way of detecting what
metric is reported in the "df" output that the client reports. Here's 
an example:

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda2             99511580  11417684  88093896  12% /

Now, it's ease to figure out that there's 12% used on my / filesystem;
even without the "Use%" column, I could just calculate 
   (100 x 11417684) / 99511580 = 12

But how can I tell what metric is used for "99511580" and "11417684" ?
The heading does say "1K-blocks", but that varies quite a bit between
the operating systems. At worst, it could be "disk blocks" - often 512
bytes, but one never knows.

Configuring a limit of "yellow at 2 GB free" requires that Hobbit can
interpret the absolute values reported by the client, not just the
relative amount of free space. I don't know if there's a good way of
doing that, except to embed (more) knowledge about the various df's
into Hobbit. And I'm not terribly keen on doing that.


Henrik

  
mmmm.... can you put a configuration line for this?
hda_blocks=1024 (or 512)....

-- 
Roberto Tagliaferri
Responsabile Progettazione & Produzione
TosNet s.r.l. - Internet Service Provider
user-ad26667b6a89@xymon.invalid
www.tosnet.it
list Chris Morris · Wed, 12 Apr 2006 10:30:56 +0100 ·
quoted from Roberto Tagliaferri
On Monday 10th April, Roberto Tagliaferri wrote :
Configuring a limit of "yellow at 2 GB free" requires that Hobbit can
interpret the absolute values reported by the client, not just the
relative amount of free space. I don't know if there's a good way of
doing that, except to embed (more) knowledge about the various df's
into Hobbit. And I'm not terribly keen on doing that.


Henrik

  
mmmm.... can you put a configuration line for this?
hda_blocks=1024 (or 512)....
The clients appear to be configured to report in Kb, so is it not better to
have something that will work at the Kb value with a caveat that if the
Admin changes the output of the df command, then the resultant check limits
will no longer be valid.
quoted from Chris Morris


Chris


****************************************************************************
The information contained in this email is intended only for the use of the intended recipient at the email address to which it has been addressed. If the reader of this message is not an intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination or copying of the message or associated attachments is strictly prohibited.

If you have received this email in error, please contact the sender by return email or call 01793 877777 and ask for the sender and then delete it immediately from your system.Please note that neither RWE npower nor the sender accepts any responsibility for viruses and it is your responsibility to scan attachments (if any).
*****************************************************************************
list Great Dilla · Wed, 12 Apr 2006 21:39:12 +0800 ·
Sorry for sending an empty mail..

Solaris version of "df" has a flag "-b" to report back the number of bytes
available on the slice. Is this what is required?

On 4/12/06, Morris, Chris (Shared Services) <user-7c3d847d296d@xymon.invalid>
quoted from Chris Morris
wrote:
On Monday 10th April, Roberto Tagliaferri wrote :
Configuring a limit of "yellow at 2 GB free" requires that Hobbit can
interpret the absolute values reported by the client, not just the
relative amount of free space. I don't know if there's a good way of
doing that, except to embed (more) knowledge about the various df's
into Hobbit. And I'm not terribly keen on doing that.


Henrik

mmmm.... can you put a configuration line for this?
hda_blocks=1024 (or 512)....
The clients appear to be configured to report in Kb, so is it not better
to
have something that will work at the Kb value with a caveat that if the
Admin changes the output of the df command, then the resultant check
limits
will no longer be valid.


Chris

****************************************************************************
The information contained in this email is intended only for the use of
the intended recipient at the email address to which it has been addressed.
If the reader of this message is not an intended recipient, you are hereby
notified that you have received this document in error and that any review,
dissemination or copying of the message or associated attachments is
strictly prohibited.
If you have received this email in error, please contact the sender by
return email or call 01793 877777 and ask for the sender and then delete it
immediately from your system.Please note that neither RWE npower nor the
sender accepts any responsibility for viruses and it is your responsibility
to scan attachments (if any).
****************************************************************************
*
list Jeff Newman · Wed, 12 Apr 2006 13:52:57 -0500 ·
How about we just add it as a configurable option in hobbit-clients.cfg?

HOST=foo
     DISK_MET=gb    (or 512 or mb or gb)
     DISK * 95 98
DEFAULT
     DISK_MET=kb

Something like that. That way in a mixed environment you can specify
what metric the df output is in. ?

-Jeff
quoted from Great Dilla

On 4/12/06, Great Dilla <user-3e85c7b9d5a4@xymon.invalid> wrote:
Sorry for sending an empty mail..

Solaris version of "df" has a flag "-b" to report back the number of bytes
available on the slice. Is this what is required?

On 4/12/06, Morris, Chris (Shared Services) <user-7c3d847d296d@xymon.invalid>
wrote:
On Monday 10th April, Roberto Tagliaferri wrote :
Configuring a limit of "yellow at 2 GB free" requires that Hobbit can
interpret the absolute values reported by the client, not just the
relative amount of free space. I don't know if there's a good way of
doing that, except to embed (more) knowledge about the various df's
into Hobbit. And I'm not terribly keen on doing that.


Henrik

mmmm.... can you put a configuration line for this?
hda_blocks=1024 (or 512)....
The clients appear to be configured to report in Kb, so is it not better
to
have something that will work at the Kb value with a caveat that if the
Admin changes the output of the df command, then the resultant check
limits
will no longer be valid.


Chris

****************************************************************************
The information contained in this email is intended only for the use of
the intended recipient at the email address to which it has been addressed.
If the reader of this message is not an intended recipient, you are hereby
notified that you have received this document in error and that any review,
dissemination or copying of the message or associated attachments is
strictly prohibited.
If you have received this email in error, please contact the sender by
return email or call 01793 877777 and ask for the sender and then delete it
immediately from your system.Please note that neither RWE npower nor the
sender accepts any responsibility for viruses and it is your responsibility
to scan attachments (if any).
****************************************************************************
*