Xymon Mailing List Archive search

Using the disk graph definitions

2 messages in this thread

list Elizabeth Jones · Thu, 13 Nov 2014 13:10:17 -0800 ·
I'm now trying to figure out how I can generate disk usage graphs using the disk definitions that are already in xymonserver.cfg and graphs.cfg.  I'm clearly not doing something right because I'm not receiving any disk rrd files.

For my test, I'm trying to send this from my command line -

/home/xymon/xymon.sh 192.50.150.12 "data server0,mycompany,com.disk \n pct : 65"

I took the xymon.sh script from a post that I found in the mail archives here -
( echo "$2"; sleep 1 ) | telnet $1 1984 2>&1 >/dev/null | grep -v "closed by foreign host"


This works perfectly for generating cpu usage graphs with a variable that I created, solcpu:
/home/xymon/xymon.sh 192.50.150.12 "data server0,mycompany.com.solcpu \n solcpu : 90"

I get an rrd file named solcpu.rrd and I'm able to generate a graph by just adding solcpu to xymonserver.cfg and graphs.cfg.

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.  But no disk.rrd file is being generated in my rrd directory. I see in other server directories that the files that are created are disk,root.rrd or disk,opt.rrd so maybe I need to do something to shovel the disk volume name into my string somehow?


EJ
list Jeremy Laidman · Mon, 17 Nov 2014 14:44:17 +1100 ·
On 14 November 2014 08:13, Elizabeth Jones via Xymon <xymon at xymon.com>
quoted from Elizabeth Jones
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