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

Jeremy Laidman jlaidman at rebel-it.com.au
Tue Mar 27 05:55:36 CEST 2012


On Mon, Mar 26, 2012 at 12:17 PM, Jeremy Laidman
<jlaidman at rebel-it.com.au> wrote:
> 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.

<time passes>

I've completed a version that works with the COMMENT: and DESCR:
strings instead of looking at the column names.  Find it here:
http://pastebin.com/zr1MWSPe.  Instructions are in the file, but
briefly just create DESCR or COMMENT settings in hosts.cfg like so:

10.1.1.10 someserver.example.com # testip ssh dns http DESCR:"random
server (connect: https, http, ssh)"

This will create hotlinks for https://servername, http://servername
and ssh://servername.  Hovering over the servername will show hover
text of "random server", as the "(connect:...)" string will be
stripped out.

Unfortunately, the DESCR is not displayed consistently in all pages.
For instance, in the "all non-green" page, the DESCR string is not
shown as hover text, but in parens after the hostname.  In theory,
this hack could clean up such cases, but doesn't.  I'll leave that as
an exercise for someone else.

Another idea I had for this was to allow specifying something like
"(link: http://someplace/?q=%s)".  This would be used to hotlink the
hostname.  This could be a link to your corporate asset management
system, or a page in your documentation wiki.  Again, this would want
to handle the "all non-green" anomaly.

Finally, a hint for anyone else trying this: dollar signs are
verboten.  I couldn't find a way to escape a dollar sign, but it seems
that xymongen can't handle them.  This is why I use
jQuery(...).somefunc() a lot, rather than the more common
$.somefunc().  I'm guessing it's a bug in xymongen, and I'm simply
pushing the limits on what was intended.

J



More information about the Xymon mailing list