[Xymon] Custom graphs, non-standard config

Jeremy Laidman jlaidman at rebel-it.com.au
Wed Apr 3 02:11:09 CEST 2013


David

Making a cpu status message requires it to be formatted just right.

Instead, you can craft up a "client" message for the device, and Hobbit
(the hobbitd_channel process) will parse the client data for [top] and
[uptime] messages and feed them into hobbitd_client, which generates status
and data messages on behalf of the client.  The data/status messages should
be formatted in the way Hobbit can use to create and show graphs.  More
info in the man page for hobbitd_client, such as here:

http://hobbit.math.cnrs.fr/hobbit/help/manpages/man8/hobbitd_client.8.html

The load average is actually gleaned from the 'uptime' data, and not from
'top'.  If you can generate a valid client message showing an [uptime]
section, then it should create a cpu page and graph data.  The uptime
message needs to be a form expected by hobbitd_client, such as:

 10:05am  up 27 day(s),  9:16,  1 user,  load average: 0.32, 0.36, 0.33

So all you need to do is something like so:

/usr/local/bin/bb****

192.168.0.1****

client qcosvhsm1.linux**

[uptime]

10:05am  up 1 day(s), 9:16, 1 user, load average: 0.10, 0.10, 0.09
Once hobbitd_client parses the message, it then creates a "cpu" status
message to inject into Hobbit, and the message gets collected by
hobbitd_rrd (via hobbitd_channel), and hobbitd_rrd pushes the numbers into
la.rrd (test-to-RRD-filename translation is specified by TEST2RRD).

You could bypass the client message, and just create a "cpu" status message
of the correct format, but I've found it easier to use a client message for
all the different things I want to collect, and send them all to Hobbit at
once.

The same principle applies to other data collected and graphed from client
messages, such as disk space, memory, interface usage.

Cheers
Jeremy


On 3 April 2013 09:21, Haertig, David F (Dave) <haertig at avaya.com> wrote:

>  My installation is an old Hobbit 4.2.0 one, but in case the graphing is
> still similar to the way Xymon does things nowadays, I thought I’d ask here.
> ****
>
> ** **
>
> I am familiar with custom graphs, using NCV, and have implemented many.  I
> am looking to try something a little different from that.****
>
> ** **
>
> I have a network appliance (not a “server”) that cannot have the Hobbit
> client installed on it, but I can gather CPU load info from it like this
> “ssh user at appliance status cpu”.  This generates a response like this
> example: ****
>
> ** **
>
> 0.18 0.14 0.10 3/74 29150****
>
> Command Result : 0 (Success)****
>
> ** **
>
> I currently use the above collected data to create a “status” message that
> I then use the “bb” command to send to Hobbit.  Works as expected, with the
> data showing up in the “cpu” column for this appliance I am monitoring:***
> *
>
> ** **
>
> /usr/local/bin/bb****
>
> 192.168.0.1****
>
> status qcosvhsm1.cpu green Tue Apr  2 15:55:16 2013****
>
> CPU load****
>
> ========****
>
> ** **
>
> &green 5 minute average CPU load is 0.10, which is <= warning level of 3**
> **
>
> ** **
>
> load average: 0.10, 0.10, 0.09****
>
> ** **
>
> Raw data (command = 'status cpu'):****
>
>    0.10 0.10 0.09 3/74 7177****
>
>    Command Result : 0 (Success)****
>
> ** **
>
> (I have other custom stuff that turns text like “&green” into a link to
> the green light icon Hobbit normally uses, but that’s irrelevant to my
> questions here.)****
>
> ** **
>
> *What I would like to do is use the built-in RRD and “CPU Load” graph
> definitions to display a graph on the Hobbit webpage.*  I realize I can
> make my own custom ones, and I know how to do that already (but not showing
> up on the default “cpu” column, I’d have to make a different “cpu_load”
> column using a different name than just “cpu”), but I wanted to try sending
> my data into Hobbit to force it to use the built-in definitions rather than
> my own custom defs.  You can see in the above bb message I formatted a part
> of the text as “load average: 0.10, 0.10, 0.09” so that would mimic what
> Hobbit normally sees in the data typically collected with “top” (which I
> believe is how it collects data on CPU load – but I’m not sure of Hobbits
> internals in this case – possibly it uses some other command, maybe
> “uptime”).****
>
> ** **
>
> Do I need to send an additional “data” message along with the “status”
> message above to trigger the graphing?  What format would that data message
> require?  Typically for a custom graph you add onto the TEST2RRD line with
> “column_name=ncv” but I can see as part of the original TEST2RRD line that
> there already is a part that says “cpu=la”.  As I understand TEST2RRD (and
> I don’t understand it all that well), I think this means that incoming
> “status” and “data” messages for “cpu” are directed to some internal “la”
> module.  I am working on the assumption that all’s I need to do to invoke
> the built-in graphing defs for “CPU Load” is to format my custom status
> message so that the “la” module can parse out the load data it needs for
> graphing.  Am I even close to being correct in this assumption?****
>
> ** **
>
> Any tips on how I should proceed?  This is as much a mental gymnastics
> exercise as anything.  It is going into a production system and I know how
> to skin this cat another way.  I was just hoping to learn how to skin this
> cat using the already built-in “CPU Load” graphing definitions.****
>
> ** **
>
> Thanks in advance!****
>
> ** **
>
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130403/0c9c8f8c/attachment.html>


More information about the Xymon mailing list