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:<div><br></div><div>     #!/bin/bash</div><div>     echo "Content-Type: text/plain"</div>
<div>     echo ""</div><div>     /home/xymon/server/bin/xymon localhost "xymondboard $QUERY_STRING"</div><div><br></div><div>then called it using curl:</div><div><br></div><div>     curl -s -S -L "<a href="http://server.domain.com/xymon-cgi/xap.sh?color=red">http://server.domain.com/xymon-cgi/xap.sh?color=red</a>"<br>
     curl -s -S -L "<a href="http://server.domain.com/xymon-cgi/xap.sh?color=yellow">http://server.domain.com/xymon-cgi/xap.sh?color=yellow</a>"<br>     curl -s -S -L "<a href="http://server.domain.com/xymon-cgi/xap.sh?color=purple">http://server.domain.com/xymon-cgi/xap.sh?color=purple</a>"<br>
<br>Piping those through "wc" I get a total of 3305 bytes for all three.  Fetching the non-green page:</div><div><br></div><div>     curl -s -S -L "<a href="http://server.domain.com/xymon/nongreen.html">http://server.domain.com/xymon/nongreen.html</a>"<br>
</div><div><br></div><div>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.</div><div><br>
</div><div>Ralph Mitchell</div><div><br></div><div><br><div class="gmail_quote">On Thu, Nov 3, 2011 at 7:55 AM,  <span dir="ltr"><<a href="mailto:henrik@hswn.dk">henrik@hswn.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On Thu, 3 Nov 2011 07:01:32 -0400, Ralph Mitchell<br>
<<a href="mailto:ralphmitchell@gmail.com">ralphmitchell@gmail.com</a>><br>
wrote:<br>
<div class="im">> Henrik, has the format of hobbitdboard / xymondboard changed much<br>
between<br>
> versions??  It would be fairly easy to make that available via a cgi<br>
script<br>
> and it would be easier to parse than html.<br>
<br>
</div>No, this format is fairly static - and you can make it entirely "fixed" by<br>
adding a "fields" option to select the data-items you are interested in.<br>
<br>
But to pick only the hosts that appear on a specific page must be done on<br>
the Xymon server - you don't want to download a lot of info to the<br>
smartphone, just to throw it away later (unless you have a flat-rate data<br>
plan for your smartphone, and I don't).<br>
<br>
And when we have to code the filtering, we may just as well add the code<br>
to provide the data in a standardized format. Something similar to the<br>
xymondxboard output, probably.<br>
<br>
<br>
Regards,<br>
<span class="HOEnZb"><font color="#888888">Henrik<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
</div></div></blockquote></div><br></div>