[Xymon] Antw.: Antw.: Extra column containing an access protocol (putty, telnet, mstsc)

Jeremy Laidman jlaidman at rebel-it.com.au
Mon Mar 26 03:17:32 CEST 2012


On Mon, Mar 26, 2012 at 2:31 AM, Nico <nicolas at lienard.name> wrote:
> Hi jeremy;
>
> I'm also interested in this feature.
>
> Let me know if you manage to set it up by the $XYMONBODYFOOTER javascript
> way.

Nico, happy to help.  This is my first attempt, so it might have some
bugs, and certainly isn't perfect.

I've put the contents of xymonbodyfooter.cfg into
http://pastebin.com/eiCGC0yL.  Then in xymonserver.cfg:

XYMONBODYFOOTER="file:$XYMONHOME/etc/xymonbodyfooter.cfg"

I'm not a javascript programmer, so I'm sure someone else can come up
with a better implementation.  Consider it simply a proof-of-concept.

The script finds each hostname at the start of each row in the table,
then finds any columns of "http", "https" or "ssh" for that host, and
for each it creates a link after the hostname.  Adding extra connect
methods (eg rdp) requires addition to the "markuplist" array.

If there's no matching column, then the hotlink won't get created.
So, for instance, if you want a telnet: link, you need to have a
telnet test.  It would be nice to have it configurable on a per-host
basis, such as defining the available methods in hosts.cfg, but I
can't find a way for the javascript to get access to hosts.cfg
settings.  I thought about using the COMMENT: or DESCR: fields, but I
wasn't able to reliably get the details.  Perhaps I'll try this again
when I gets some spare time.

Cheers
Jeremy



More information about the Xymon mailing list