Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Dynamic Hostname Notes ====== ^ Author | [[ jlaidman@rebel-it.com.au | Jeremy Laidman ]] | ^ Compatibility | Xymon 4.x | ^ Requirements | none | ^ Download | None | ^ Last Update | 2015-09-29 | ===== Description ===== A standard Xymon feature allows the creation of a "notes" file under ''$XYMONVAR/www/notes/'' with the filename ''<hostname>.html''. This causes Xymon to hotlink the hostname, so that clicking on it displays the file's contents. This addon is a hostname "notes" template file, that uses Javascript to auto-generate various aspects of the file's contents. Because the content is auto-generated, the file can be copied unchanged (or symlinked) to other filenames, to cover as many hosts as required. {{ :addons:dynamic-dns-notes-image.png?400 |}} ===== Installation ===== To install: - copy the file somewhere on your server, perhaps in $XYMONVAR/www/notes/ - edit the file to add schemes other than ssh:, if required - symlink the file to match a hostname, for example:<code>ln -s dynamic-host-notes.html server1.html</code> - repeat for all required hosts ===== Source ===== ==== notes-template.html ==== <hidden onHidden="Show Code ⇲" onVisible="Hide Code ⇱"> <code javascript notes-template.html> <HEAD> <TITLE>Connecting to servername</TITLE> <!-- *** Clicking on a hostname shows this page, if named <hostname>.html *** This file is located in server/www/notes/ --> <!-- Styles for the Xymon body --> <link rel="stylesheet" type="text/css" href="/xymon/gifs/xymonbody.css"> <!-- Styles for the menu bar --> <link rel="stylesheet" type="text/css" href="/xymon/menu/xymonmenu-blue.css"> <!-- The favicon image --> <link rel="shortcut icon" href="/xymon/gifs/favicon-blue.ico"> </HEAD> <BODY class="blue"> <div id="menue"> <div class="outer"> <span class="menutag">Views<span class="invis">: </span></span> <a class="inner-1" href="/xymon/xymon.html">Main view</a><span class="invis"> | </span> <a class="inner" href="/xymon/nongreen.html">All non-green view</a><span class="invis"> | </span> <a class="inner" href="/xymon-cgi/criticalview.sh">Critical systems</a> </div> <div class="outer"> <span class="menutag">Reports<span class="invis">: </span></span> <a class="inner-1" href="/xymon-cgi/eventlog.sh">Event log Report</a><span class="invis"> | </span> <a class="inner" href="/xymon-cgi/topchanges.sh">Top Changes</a><span class="invis"> | </span> <a class="inner" href="/xymon-cgi/report.sh">Availability Report</a><span class="invis"> | </span> <a class="inner" href="/xymon-cgi/snapshot.sh">Snapshot Report</a><span class="invis"> | </span> <a class="inner" href="/xymon-cgi/confreport.sh">Config Report</a><span class="invis"> | </span> <a class="inner" href="/xymon-cgi/confreport-critical.sh">Config Report (Critical)</a><span class="invis"> | </span> <a class="inner" href="/xymon-cgi/hostgraphs.sh">Metrics Report</a><span class="invis"> | </span> <a class="inner" href="/xymon-cgi/ghostlist.sh">Ghost Clients</a><span class="invis"> | </span> <a class="inner" href="/xymon-cgi/notifications.sh">Notification Report</a> <a class="inner" href="/xymon/periodic/">Periodic Reports</a> </div> <div class="outer"> <span class="menutag">Administration<span class="invis">: </span></span> <a class="inner-1" href="/xymon-cgi/findhost.sh">Find host</a><span class="invis"> | </span> <a class="inner" href="/xymon-seccgi/acknowledge.sh">Acknowledge alert</a><span class="invis"> | </span> <a class="inner" href="/xymon-seccgi/enadis.sh">Enable/disable</a><span class="invis"> | </span> <a class="inner" href="/xymon-seccgi/criticaleditor.sh">Edit critical systems</a> </div> <div class="outer"> <span class="menutag">Help<span class="invis">: </span></span> <a class="inner-1" href="/xymon/help/about.html">About Xymon</a><span class="invis"> | </span> <a class="inner" href="/xymon/help/install.html">Installing Xymon</a><span class="invis"> | </span> <a class="inner" href="/xymon/help/xymon-config.html">Configuring Monitoring</a><span class="invis"> | </span> <a class="inner" href="/xymon/help/xymon-alerts.html">Configuring Alerts</a><span class="invis"> | </span> <a class="inner" href="/xymon/help/criticalsystems.html">Critical systems</a><span class="invis"> | </span> <a class="inner" href="/xymon/help/known-issues.html">Known problems</a><span class="invis"> | </span> <a class="inner" href="/xymon/help/xymon-tips.html">Tips and Tricks</a><span class="invis"> | </span> <a class="inner" href="/xymon/help/howtograph.html">Custom graphs</a><span class="invis"> | </span> <a class="inner" href="/xymon/help/manpages/">Xymon man-pages</a> <a class="inner" href="/xymon/help/devmon.html">Devmon documentation</a> </div> </div> <TABLE SUMMARY="Topline" WIDTH="100%"> <TR><TD HEIGHT=16> </TD></TR> <!-- For the menu bar --> </TABLE> <SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"> <!-- servername=location.href.match(/([^\/]+)\.html/)[1]; if (servername.match("-ilo")) { // a server name containing "-ilo" is an iLO iloname=servername; } else if (servername.match("lx.*\.in\.")) { // a server name named "lx*.in.bla" has an iLO in // in the same domain called "X-ilo.in.bla" iloname=servername.replace(".in.","-ilo.in."); } else { iloname=""; } document.title=document.title.replace("servername",servername); xymurl=location.href.match(/^([^\/]*:\/\/[^\/]+)/)[0]; document.write('<H2>Server: '+servername+'</H2>'); if (iloname != servername) { document.write('Connect using SSH: <a href="ssh://'+servername+'">ssh://'+servername+'</a> (may not work in IE8)<BR>'); } if (iloname.length > 0) { document.write('Connect to iLO: <a href="https://'+iloname+'" target="_blank">https://'+iloname+'</a> or <a href="ssh://'+iloname+'">ssh://'+iloname+'</a><BR>'); } document.write('View <a href="'+xymurl+'/xymon-cgi/svcstatus.sh?HOST='+servername+'&SERVICE=info">Info</a><BR>'); document.write('View <a href="'+xymurl+'/xymon-cgi/svcstatus.sh?HOST='+servername+'&SERVICE=trends">Trends</a><BR>'); document.write('View <a href="'+xymurl+'/xymon-cgi/eventlog.sh?HOSTMATCH='+servername+ '&MAXTIME=86400&MAXCOUNT=100&Send=View+log'+ '">Event Log</a> for the last 24 hours<BR>'); d=new Date(); start_year=d.getFullYear(); start_mon=d.getMonth()+1; start_day=d.getDate(); document.write('View <a href="'+xymurl+'/xymon-cgi/hostgraphs.sh'+ '?start-mon='+start_mon+'&start-day='+start_day+'&start-yr='+start_year+ '&end-mon='+start_mon+'&end-day='+start_day+'&end-yr='+start_year+ '&hostname='+servername+ '&testname=ALL'+ '&DoReport=Generate+Report'+ '">Metrics Report</a> for today (CPU/disk/memory/conn)<BR>'); document.write('<a href="'+xymurl+'/xymon-cgi/findhost.sh?HOST='+servername+'&jump">Find</a> this host in Xymon pages<BR>'); --> </SCRIPT> </BODY> </code> </hidden> ===== Known Bugs and Issues ===== ===== To Do ===== ===== Credits ===== ===== Changelog ===== * **2015-09-29** * Initial release addons/dynamic-host-notes.txt Last modified: 2017/07/07 01:31by jez