Error loading plugin struct
ParseError: syntax error, unexpected 'fn' (T_STRING), expecting :: (T_PAAMAYIM_NEKUDOTAYIM)
More info is available in the error log.

Dynamic Hostname Notes

Author Jeremy Laidman
Compatibility Xymon 4.x
Requirements none
Download None
Last Update 2015-09-29

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.

To install:

  1. copy the file somewhere on your server, perhaps in $XYMONVAR/www/notes/
  2. edit the file to add schemes other than ssh:, if required
  3. symlink the file to match a hostname, for example:
    ln -s dynamic-host-notes.html server1.html
  4. repeat for all required hosts

Show Code ⇲

Hide Code ⇱

<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">
<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/">Critical systems</a>
    <div class="outer">
      <span class="menutag">Reports<span class="invis">: </span></span>
        <a class="inner-1" href="/xymon-cgi/">Event log Report</a><span class="invis"> | </span>
        <a class="inner" href="/xymon-cgi/">Top Changes</a><span class="invis"> | </span>
        <a class="inner" href="/xymon-cgi/">Availability Report</a><span class="invis"> | </span>
        <a class="inner" href="/xymon-cgi/">Snapshot Report</a><span class="invis"> | </span>
        <a class="inner" href="/xymon-cgi/">Config Report</a><span class="invis"> | </span>
        <a class="inner" href="/xymon-cgi/">Config Report (Critical)</a><span class="invis"> | </span>
        <a class="inner" href="/xymon-cgi/">Metrics Report</a><span class="invis"> | </span>
        <a class="inner" href="/xymon-cgi/">Ghost Clients</a><span class="invis"> | </span>
        <a class="inner" href="/xymon-cgi/">Notification Report</a>
        <a class="inner" href="/xymon/periodic/">Periodic Reports</a>
    <div class="outer">
      <span class="menutag">Administration<span class="invis">: </span></span>
        <a class="inner-1" href="/xymon-cgi/">Find host</a><span class="invis"> | </span>
        <a class="inner" href="/xymon-seccgi/">Acknowledge alert</a><span class="invis"> | </span>
        <a class="inner" href="/xymon-seccgi/">Enable/disable</a><span class="invis"> | </span>
        <a class="inner" href="/xymon-seccgi/">Edit critical systems</a>
    <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>
<TABLE SUMMARY="Topline" WIDTH="100%">
<TR><TD HEIGHT=16>&nbsp;</TD></TR>  <!-- For the menu bar -->
if (servername.match("-ilo")) {
        // a server name containing "-ilo" is an iLO
} else if (servername.match("lx.*\.in\.")) {
        // a server name named "lx*.in.bla" has an iLO in
        // in the same domain called ""
} else {
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/'+servername+'&SERVICE=info">Info</a><BR>');
document.write('View <a href="'+xymurl+'/xymon-cgi/'+servername+'&SERVICE=trends">Trends</a><BR>');
document.write('View <a href="'+xymurl+'/xymon-cgi/'+servername+
        '">Event Log</a> for the last 24 hours<BR>');
d=new Date();
document.write('View <a href="'+xymurl+'/xymon-cgi/'+
        '">Metrics Report</a> for today (CPU/disk/memory/conn)<BR>');
document.write('<a href="'+xymurl+'/xymon-cgi/'+servername+'&jump">Find</a> this host in Xymon pages<BR>');
  • 2015-09-29
    • Initial release
  • addons/dynamic-host-notes.txt
  • Last modified: 2017/07/07 01:31
  • by jez