Antw.: Antw.: Extra column containing an access protocol (putty, telnet, mstsc)
Hello,
I’ve got it managed to create a workaround for our company. This contains some steps:
i decided to add specific tags to the hosts.cfg file (i.e. “PT” for telnet, “PS” for ssh, “PR” for rdp, “HT” for http, “HS” for https – just my idea to identify “my” options….)i created a script which walks through the hosts.cfg, looks for those option tags and creates “per-host-specific” html files, which are placed in the server/www/notes/ directory - these files contain the protocol specific connect URL as shown in the screenshots:
a. for PuTTY [cid:image002.png at 01CD05C1.69825AB0]
b. for RDP / RDP console: [cid:image003.png at 01CD05C1.69825AB0]
c. for https: [cid:image004.png at 01CD05C1.69825AB0]
i did that for any of “my” protocol tags; depending on “my” tags, the script creates more than one protocol entryi added the specific protocol handler to the registry and I’m using a special compiled putty version to accept a “%1” parameter in the command lineDisadvantage: you cannot use another “notes” page any longer
The above sounds very confusing, but for our company it’s working.
I had no success creating an additional column per host to include an optional connect url.
Regards Christian
Von: Gé Janssen [mailto:ge.janssen at gmail.com] Gesendet: Montag, 19. März 2012 09:36 An: Becker Christian Betreff: [Spam:] Re: [Xymon] Antw.: Antw.: Extra column containing an access protocol (putty, telnet, mstsc)
Im Rahmen der Firmenrichtlinie wurde die Nachricht als Spam identifiziert
Hello Christian,
Seen your message on the xymon mailing list.
Did you had any success? I tried it, but didn't succeed:
https://home.gejanssen.com/xymon/Linux/Linux.html
The mercure server has the putty remark, but no success.
Regards
Gé Janssen On Sat, Mar 10, 2012 at 9:40 AM, Becker Christian <christian.becker at rhein-zeitung.net<mailto:christian.becker at rhein-zeitung.net>> wrote:
Jon,
your idea sounds very good! I'll give this a try on Monday. Think that's what I want
Thank you, Regards Christian
Sent using HTC Desire ----- Reply message ----- Von: "Jon Dustin" <jdustin at usm.maine.edu<mailto:jdustin at usm.maine.edu>> Datum: Fr., Mär. 9, 2012 23:19 Betreff: [Xymon] Antw.: Extra column containing an access protocol (putty, telnet, mstsc) An: "xymon at xymon.com<mailto:xymon at xymon.com>" <xymon at xymon.com<mailto:xymon at xymon.com>>
On 3/9/2012 at 3:44 PM, in message <0020F6A9-8970-412C-8584-952204D4506F at rhein-zeitung.net<mailto:0020F6A9-8970-412C-8584-952204D4506F at rhein-zeitung.net>>, Becker Christian <christian.becker at rhein-zeitung.net<mailto:christian.becker at rhein-zeitung.net>> wrote: Don, using a normal Windows machine I want to view the xymon monitoring pages. If a page contains for example Linux servers, I want to have a PuTTY column. Clicking on that should open PuTTY on my local Windows pc and connect to the selected Linux server on the xymon page. The same with telnet for Cisco devices and mstsc for Windows machines. That enables me to connect to nearly all monitored machines from one point just by clicking webpages.
How about if you use the built-in "info" button in Xymon? Look at the HOSTS.CFG manpages, specifically:
DESCR:Hosttype:Description Define some informational text about the host. The "Hosttype" is a text describing the type of this device - "router", "switch", "hub", "server" etc. The "Description" is an informational text that will be shown on the "Info" column page; this can e.g. be used to store information about the physical location of the device, contact persons etc. If the text contain whitespace, you must enclose it in double-quotes, e.g. DESCR:"switch:4th floor Marketing switch"
You may add html code to the DESCR field, and your browser will make it "clickable".
I think you're wanting something like the following:
(hosts.cfg) 192.168.1.24 servername.co.com<http://servername.co.com> # DESCR:"Web Server:description <a href=ssh:192.168.1.24>ssh</a>"
The above entry inside hosts.cfg would add a link of ssh:192.168.1.24 to the "info" button associated with that host in Xymon.
I hope this is clear; good luck!
--
Jon Dustin - Network Specialist University of Southern Maine Portland, ME 207-780-4152
CSC • This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose • CSC Deutschland Services GmbH • Registered Office: Abraham-Lincoln-Park 1, 65189 Wiesbaden, Germany • Board of Directors: Gerhard Fercho (Chairman),Thomas Nebe, Peter Schmidt • Registered in Germany: HRB 7574, Wiesbaden
2012/3/19 Becker Christian <christian.becker at rhein-zeitung.net>
I had no success creating an additional column per host to include an optional connect url.
Perhaps a bit of javascript added into $XYMONBODYFOOTER could automagically create links based on tests. So if a host has a test called "ssh" then it could automatically create an [ssh] link next to the hostname.
I'm having a play with this now...
J
Hi jeremy;
I'm also interested in this feature.
Let me know if you manage to set it up by the $XYMONBODYFOOTER javascript way.
Cheers nico
Le 21 mars 2012 à 22:56, Jeremy Laidman a écrit :
2012/3/19 Becker Christian <christian.becker at rhein-zeitung.net>
I had no success creating an additional column per host to include an optional connect url.
Perhaps a bit of javascript added into $XYMONBODYFOOTER could automagically create links based on tests. So if a host has a test called "ssh" then it could automatically create an [ssh] link next to the hostname.
I'm having a play with this now...
J
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
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
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
Impressive....
Jamison Maxwell Jamison at newasterisk.com
-----Original Message----- From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Jeremy Laidman Sent: Monday, March 26, 2012 11:56 PM To: Nico Cc: xymon at xymon.com Subject: Re: [Xymon] Antw.: Antw.: Extra column containing an access protocol (putty, telnet, mstsc)
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
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
participants (4)
-
christian.becker@rhein-zeitung.net
-
jamison@newasterisk.com
-
jlaidman@rebel-it.com.au
-
nicolas@lienard.name