[Xymon] Using the disk graph definitions

Jeremy Laidman jlaidman at rebel-it.com.au
Mon Nov 17 04:44:17 CET 2014


On 14 November 2014 08:13, Elizabeth Jones via Xymon <xymon at xymon.com>
wrote:

> So I thought if I sent the same type of data stream but instead used
> server0,mycompany,com.disk \n pct : 65 - this would be recognized by the
> disk section in xymonserver.cfg and graphs.cfg.
>

I would guess that it doesn't work because the "disk" status is special,
having its own dedicated parser within the Xymon client processing code.
Xymon has special processing to parse disk usage data from the client
message, and it if comes in via another mechanism, it might not work as
expected.  If you're sending NCV data, you probably need TEST2RRD to have
"disk=ncv" so that the NCV parser will know to look for NCV format strings,
but doing so might break processing for other disk data from real Xymon
clients.

I think there are more problems with what you're trying to do.  For the
graph definition to work, the disk files need to be separated for each
filesystem, so that you get "disk,root.rrd", "disk,home.rrd" and similar.
So this suggests that you need to use SPLITNCV, otherwise all of the data
will go into a single RRD file.  When you use SPLITNCV, it creates the RRD
files, but uses the dataset name "lambda" instead of "pct".  If you want to
be able to specify the dataset name, you can't use SPLITNCV, and so you'd
end up with one RRD file.  So I think you can't succeed using the path
you've started down.

>From my understanding of the way Xymon normally does this for filesystem
usage is as follows.  The Xymon client (which you can't install) builds up
a "client" type message containing (among others) a "[df]" section with the
"df" output run on the client machine.  This client message is sent to the
Xymon server, where xymond gives it to an instance of xymond_client (via
xymond_channel) for parsing and analysis.  The way it's parsed depends on
the OS of the client machine, and each supported OS has dedicated code that
parses various client message sections in a way that's appropriate to that
OS.

After analysing the "df" section from the client message, xymond_client
creates a disk report with the results of its analysis.  This report
includes the status of disk usage compared against thresholds.  The disk
report is sent back (via localhost:1984) to xymond in a disk "status"
message, for display on the "disk" test page for the server.

The "status" message is directed to xymond_rrd (via xymond_channel) where
it is parsed for numbers and filesystem names, which are given to the RRD
library to create/update the RRD file.

So there are several points at which you could potentially inject your own
"disk" message:
1) Create your own "client" message complete with a "[df]" section, and
send to the server.  This is what my xymon-rclient does.

2) Create your own disk report in a disk "status" message, and send to the
server.  As long as it's formatted in a way that Xymon can parse, it'll
create both the status message and the RRD data.

3) Create your own NCV data to feed into xymond_rrd in a status message (or
the equivalent "trends" message).  This seems to be what you're trying to
do.  I don't think this will provide you with a "disk" dot, so you'll only
be able to see the graph on the trends page, and I don't think you can
overcome the issues I raised above.

The simplest thing to get just the disk usage, would be to create a client
message.  But it's probably easier, and provides more data for you, to use
my xymon-rclient.

J
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20141117/1d2ef672/attachment.html>


More information about the Xymon mailing list