Xymon Mailing List Archive search

Android 2.2 App

list Ralph Mitchell
Thu, 3 Nov 2011 09:29:21 -0400
Message-Id: <user-9ff2faf9b19d@xymon.invalid>

I was just thinking that xymondboard might be a good starting point for an
API.  I just put a very simple CGI script on my server:

     #!/bin/bash
     echo "Content-Type: text/plain"
     echo ""
     /home/xymon/server/bin/xymon localhost "xymondboard $QUERY_STRING"

then called it using curl:

     curl -s -S -L "http://server.domain.com/xymon-cgi/xap.sh?color=red";
     curl -s -S -L "http://server.domain.com/xymon-cgi/xap.sh?color=yellow";
     curl -s -S -L "http://server.domain.com/xymon-cgi/xap.sh?color=purple";

Piping those through "wc" I get a total of 3305 bytes for all three.
 Fetching the non-green page:

     curl -s -S -L "http://server.domain.com/xymon/nongreen.html";

gives me 30070 bytes.  Obviously that's going to depend on reporting
activity - I currently only have 14 lines in the "events received in the
past 240 minutes" block.

Ralph Mitchell


On Thu, Nov 3, 2011 at 7:55 AM, <user-ce4a2c883f75@xymon.invalid> wrote:
On Thu, 3 Nov 2011 07:01:32 -0400, Ralph Mitchell
<user-00a5e44c48c0@xymon.invalid>
wrote:
Henrik, has the format of hobbitdboard / xymondboard changed much
between
versions??  It would be fairly easy to make that available via a cgi
script
and it would be easier to parse than html.
No, this format is fairly static - and you can make it entirely "fixed" by
adding a "fields" option to select the data-items you are interested in.

But to pick only the hosts that appear on a specific page must be done on
the Xymon server - you don't want to download a lot of info to the
smartphone, just to throw it away later (unless you have a flat-rate data
plan for your smartphone, and I don't).

And when we have to code the filtering, we may just as well add the code
to provide the data in a standardized format. Something similar to the
xymondxboard output, probably.


Regards,
Henrik