[Xymon] Agent information

Jeremy Laidman jlaidman at rebel-it.com.au
Thu Jan 29 04:53:30 CET 2015


On 29 January 2015 at 06:29, J.C. Cleaver <cleaver at terabithia.org> wrote:

> All of those values are collected as the raw output from various unix
> shell commands.
>

Yep, exactly as JC said.  To illustrate a little bit more, you should have
a look at the xymonclient-linux.sh (or any of the other OS-specific
versions of the same).  At around line 80 is the code for "free" to show
free memory, which looks like this:

echo "[free]"
free

The output for this is something like:

[free]
             total       used       free     shared    buffers     cached
Mem:       6103900    5495904     607996          0     655316    4156752
-/+ buffers/cache:     683836    5420064
Swap:      6291448         88    6291360

So this text, and all of the others that are generated by
xymonclient-linux.sh, are sent as a client message to the Xymon server.
Have a look at an example client message on the demon website at
http://xymon.org/xymon-cgi/svcstatus.sh?CLIENT=felix.hswn.dk.  You'll see a
[free] section that looks pretty much like I showed above.

In fact, if you run xymonclient-linux.sh on a client installation, it will
send the client message to your screen.

If a new OS came along, anyone could create their own xymonclient-newos.sh
script and have it run all of the appropriate commands (df, free, ifconfig)
to generate the same text elements as all of the other OS-specific client
scripts.

Then, on the Xymon server side, different bits of the client message
processing code will parse the client message for different sections.  The
bit that looks for free memory will look for the [free] section for a
Linux, AIX or SCO server, or the [meminfo] section for a BSD-type server,
or [memory] section for a Solaris, HPUX or Windows server.  In most cases,
the same section is used for all OSes, but in some cases, there are
significant differences between OS flavours, and so different code needs to
parse them differently.  But the important thing is that the client message
contains the output of the "df", "top", "vmstat" or whatever commands,
labeled by [sections], and sent to the server for parsing.

Cheers
Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20150129/2e6d1b35/attachment.html>


More information about the Xymon mailing list