<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Works great Jeremy...just missing the <html></html> tags.  The ssh piece could bite you for short hostnames (which I should stop putting in my host configs).<br>
</p>
<p><br>
</p>
<p>=G=<br>
</p>
<p><br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Xymon <xymon-bounces@xymon.com> on behalf of Jeremy Laidman <jlaidman@rebel-it.com.au><br>
<b>Sent:</b> Friday, July 17, 2015 1:22 AM<br>
<b>To:</b> Dan Oakes<br>
<b>Cc:</b> xymon@xymon.com<br>
<b>Subject:</b> Re: [Xymon] Turning Hostname into Hyperlink Changes Graph Titles</font>
<div> </div>
</div>
<div>
<div dir="ltr">Dan
<div><br>
</div>
<div>What I do is to leave the hostname alone, but create a "notes" file for each hostname I want to access.  These files go in XYMONNOTESDIR (defined in xymonserver.cfg), as standard HTML files.  For each of my servers I've an ssh:// link to the server and
 http:// to the iLO, plus a few direct links to useful things within Xymon.</div>
<div><br>
</div>
<div>To access notes, just click on the hostname.  If the notes file exists, it will be hotlinked.</div>
<div><br>
</div>
<div><br>
</div>
<div>Creating the notes files could be automated, but I don't have enough hosts to make it worthwhile, so I've just done it manually.  You can also specify a HOSTDOCURL in xymonserver.cfg that includes a script to run, and have the notes pages dynamically created
 based on the hostnames.</div>
<div><br>
</div>
<div>I've done a hybrid solution.  I have a generic host type notes file for a group of hosts, and I create symbolic links to each hostname that points to the generic file.  Within the notes file, I use some javascript-fu to dynamically generate the details
 on-the-fly.</div>
<div><br>
</div>
<div>For anyone interested in giving it a try, I'll append the HTML file below.</div>
<div><br>
</div>
<div>J</div>
<div><br>
</div>
<div>
<div><HEAD></div>
<div><TITLE>Connecting to servername</TITLE></div>
<div><!--</div>
<div>   *** Clicking on a hostname shows this page, if named <hostname>.html ***</div>
<div>   This file is located in server/www/notes/</div>
<div>  --></div>
<div><br>
</div>
<div><!-- Styles for the Xymon body  --></div>
<div><link rel="stylesheet" type="text/css" href="/xymon/gifs/xymonbody.css"></div>
<div><br>
</div>
<div><!-- Styles for the menu bar --></div>
<div><link rel="stylesheet" type="text/css" href="/xymon/menu/xymonmenu-blue.css"></div>
<div><br>
</div>
<div><!-- The favicon image --></div>
<div><link rel="shortcut icon" href="/xymon/gifs/favicon-blue.ico"></div>
<div><br>
</div>
<div></HEAD></div>
<div><BODY class="blue"></div>
<div><br>
</div>
<div><div id="menue"></div>
<div>    <div class="outer"></div>
<div>      <span class="menutag">Views<span class="invis">: </span></span></div>
<div>        <a class="inner-1" href="/xymon/xymon.html">Main view</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon/nongreen.html">All non-green view</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon-cgi/criticalview.sh">Critical systems</a></div>
<div>    </div></div>
<div>    <div class="outer"></div>
<div>      <span class="menutag">Reports<span class="invis">: </span></span></div>
<div>        <a class="inner-1" href="/xymon-cgi/eventlog.sh">Event log Report</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon-cgi/topchanges.sh">Top Changes</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon-cgi/report.sh">Availability Report</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon-cgi/snapshot.sh">Snapshot Report</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon-cgi/confreport.sh">Config Report</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon-cgi/confreport-critical.sh">Config Report (Critical)</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon-cgi/hostgraphs.sh">Metrics Report</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon-cgi/ghostlist.sh">Ghost Clients</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon-cgi/notifications.sh">Notification Report</a></div>
<div>        <a class="inner" href="/xymon/periodic/">Periodic Reports</a></div>
<div>    </div></div>
<div>    <div class="outer"></div>
<div>      <span class="menutag">Administration<span class="invis">: </span></span></div>
<div>        <a class="inner-1" href="/xymon-cgi/findhost.sh">Find host</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon-seccgi/acknowledge.sh">Acknowledge alert</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon-seccgi/enadis.sh">Enable/disable</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon-seccgi/criticaleditor.sh">Edit critical systems</a></div>
<div>    </div></div>
<div>    <div class="outer"></div>
<div>      <span class="menutag">Help<span class="invis">: </span></span></div>
<div>        <a class="inner-1" href="/xymon/help/about.html">About Xymon</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon/help/install.html">Installing Xymon</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon/help/xymon-config.html">Configuring Monitoring</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon/help/xymon-alerts.html">Configuring Alerts</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon/help/criticalsystems.html">Critical systems</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon/help/known-issues.html">Known problems</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon/help/xymon-tips.html">Tips and Tricks</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon/help/howtograph.html">Custom graphs</a><span class="invis"> | </span></div>
<div>        <a class="inner" href="/xymon/help/manpages/">Xymon man-pages</a></div>
<div>        <a class="inner" href="/xymon/help/devmon.html">Devmon documentation</a></div>
<div>    </div></div>
<div></div></div>
<div><br>
</div>
<div><TABLE SUMMARY="Topline" WIDTH="100%"></div>
<div><TR><TD HEIGHT=16>&nbsp;</TD></TR>  <!-- For the menu bar --></div>
<div></TABLE></div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"></div>
<div><!--</div>
<div>servername=location.href.match(/([^\/]+)\.html/)[1];</div>
<div>if (servername.match("-ilo")) {</div>
<div>        // a server name containing "-ilo" is an iLO</div>
<div>        iloname=servername;</div>
<div>} else if (servername.match("lx.*\.in\.")) {</div>
<div>        // a server name named "lx*.in.bla" has an iLO in</div>
<div>        // in the same domain called "X-ilo.in.bla"</div>
<div>        iloname=servername.replace(".in.","-<a href="http://ilo.in">ilo.in</a>.");</div>
<div>} else {</div>
<div>        iloname="";</div>
<div>}</div>
<div>document.title=document.title.replace("servername",servername);</div>
<div>xymurl=location.href.match(/^([^\/]*:\/\/[^\/]+)/)[0];</div>
<div><br>
</div>
<div>document.write('<H2>Server: '+servername+'</H2>');</div>
<div>if (iloname != servername) {</div>
<div>        document.write('Connect using SSH: <a href="ssh://'+servername+'">ssh://'+servername+'</a> (may not work in IE8)<BR>');</div>
<div>}</div>
<div><br>
</div>
<div>if (iloname.length > 0) {</div>
<div>        document.write('Connect to iLO: <a href="https://'+iloname+'" target="_blank">https://'+iloname+'</a> or <a href="ssh://'+iloname+'">ssh://'+iloname+'</a><BR>');</div>
<div>}</div>
<div><br>
</div>
<div>document.write('View <a href="'+xymurl+'/xymon-cgi/svcstatus.sh?HOST='+servername+'&SERVICE=info">Info</a><BR>');</div>
<div>document.write('View <a href="'+xymurl+'/xymon-cgi/svcstatus.sh?HOST='+servername+'&SERVICE=trends">Trends</a><BR>');</div>
<div><br>
</div>
<div>document.write('View <a href="'+xymurl+'/xymon-cgi/eventlog.sh?HOSTMATCH='+servername+</div>
<div>        '&MAXTIME=86400&MAXCOUNT=100&Send=View+log'+</div>
<div>        '">Event Log</a> for the last 24 hours<BR>');</div>
<div><br>
</div>
<div>d=new Date();</div>
<div>start_year=d.getFullYear();</div>
<div>start_mon=d.getMonth()+1;</div>
<div>start_day=d.getDate();</div>
<div>document.write('View <a href="'+xymurl+'/xymon-cgi/hostgraphs.sh'+</div>
<div>        '?start-mon='+start_mon+'&start-day='+start_day+'&start-yr='+start_year+</div>
<div>        '&end-mon='+start_mon+'&end-day='+start_day+'&end-yr='+start_year+</div>
<div>        '&hostname='+servername+</div>
<div>        '&testname=ALL'+</div>
<div>        '&DoReport=Generate+Report'+</div>
<div>        '">Metrics Report</a> for today (CPU/disk/memory/conn)<BR>');</div>
<div><br>
</div>
<div>document.write('<a href="'+xymurl+'/xymon-cgi/findhost.sh?HOST='+servername+'&jump">Find</a> this host in Xymon pages<BR>');</div>
<div>--></div>
<div></SCRIPT></div>
<div></BODY></div>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 17 July 2015 at 04:00, Dan Oakes <span dir="ltr"><<a href="mailto:oakesbz@gmail.com" target="_blank">oakesbz@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
Hi all,<br>
<br>
I’m using the below to turn my hostnames into hyperlinks to login to each server (which works great):<br>
<br>
10.10.10.10    Hostname    # NAME:"<a href=ssh://<a href="mailto:root@10.10.10.10">root@10.10.10.10</a>>Displayed Hostname</a>"<br>
<br>
Problem is, it now uses this ugly html string as the hostname in the title of my graphs.  So it displays "<a href=ssh://root… > Disk Utilization”, etc. as the title… which is obviously not pretty.  Any thoughts on how to fix this?<br>
<br>
By the way, it also changes the displayed hostname in several other places which I managed to fix by changing the variable &XYMWEBHOST to &XMH_HOSTNAME in several of the $xymon/server/web/*_header files…<br>
<br>
Thank you!<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" rel="noreferrer" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</body>
</html>