jablonka.czprosek.czf

weathermap

Subversion Repositories:
[/] [docs/] [pages/] [config-reference.html] - Rev 1 Go to most recent revision

Compare with Previous - Blame - Download


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" media="screen" href="weathermap.css">
<title>PHP Weathermap 
v0.91
 Configuration Reference</title>
</head>
<body><div id="frame">


<div class="navcontainer">
    <ul id="navlist">
        <li><a href="main.html">Main Page</a></li>
        <li><a href="main.html#installation">Installation</a></li>
        <li><a href="main.html#basics">Basics</a></li>
        <li><a href="faq.html">FAQ and Tips</a></li>
        <li><a href="main.html#example">Sample Map</a></li>
        <li><a href="cli-reference.html">CLI Reference</a></li>
        <li><a href="config-reference.html">Config Reference</a></li>
        <li><a href="advanced.html">Advanced Topics</a></li>
        <li><a href="editor.html">Editor</a></li>
        <li><a href="cacti-plugin.html">Cacti Plugin</a></li>
        <li><a href="http://www.network-weathermap.com/">Site</a></li>
    </ul>
</div>

<div id="header">
        <h1>PHP Weathermap 
v0.91
</h1>
    <h4>Copyright &copy; 2005-2007 Howard Jones, <tt><a
href="mailto:howie@thingy.com">howie@thingy.com</a></tt>. (<a
href="http://www.network-weathermap.com/">Website</a>)</h4>
</div>


<h2><a name="configref">Configuration Reference</a></h2>
<p>This page is automatically compiled, and documents all the configuration directives that are available in PHP Weathermap 
v0.91
. </p>
        <h1 class="configsection">Introduction</h1>
          <div class="preamble"><div id="contents">
      <h4 class="configsection">Node-specific Configuration Directives</h4>
      <p id="context_NODE">
        <a href="#NODE_NODE">NODE</a>
        <a href="#NODE_POSITION">POSITION</a>
        <a href="#NODE_LABEL">LABEL</a>
        <a href="#NODE_TARGET">TARGET</a>
        <a href="#NODE_USESCALE">USESCALE</a>
        <a href="#NODE_MAXVALUE">MAXVALUE</a>
        <a href="#NODE_ICON">ICON</a>
        <a href="#NODE_LABELOFFSET">LABELOFFSET</a>
        <a href="#NODE_LABELFONT">LABELFONT</a>
        <a href="#NODE_COLORS">*COLOR</a>
        <a href="#NODE_INFOURL">INFOURL</a>
        <a href="#NODE_OVERLIBGRAPH">OVERLIBGRAPH</a>
        <a href="#NODE_OVERLIBWIDTH">OVERLIBWIDTH</a>
        <a href="#NODE_OVERLIBHEIGHT">OVERLIBHEIGHT</a>
        <a href="#NODE_OVERLIBCAPTION">OVERLIBCAPTION</a>
        <a href="#NODE_NOTES">NOTES</a>
        <a href="#NODE_SET">SET</a>
      </p>
      <h4 class="configsection">Link-specific Configuration Directives</h4>
      <p id="context_LINK">
        <a href="#LINK_LINK">LINK</a>
        <a href="#LINK_NODES">NODES</a>
        <a href="#LINK_TARGET">TARGET</a>
        <a href="#LINK_USESCALE">USESCALE</a>
        <a href="#LINK_WIDTH">WIDTH</a>
        <a href="#LINK_BANDWIDTH">BANDWIDTH</a>
        <a href="#LINK_BWLABEL">BWLABEL</a>
        <a href="#LINK_BWLABELPOS">BWLABELPOS</a>
        <a href="#LINK_BWFONT">BWFONT</a>
        <a href="#LINK_INCOMMENT">INCOMMENT</a>
        <a href="#LINK_OUTCOMMENT">OUTCOMMENT</a>
        <a href="#LINK_COMMENTFONT">COMMENTFONT</a>
        <a href="#LINK_COLORS">*COLOR</a>
        <a href="#LINK_INFOURL">INFOURL</a>
        <a href="#LINK_OVERLIBGRAPH">OVERLIBGRAPH</a>
        <a href="#LINK_OVERLIBWIDTH">OVERLIBWIDTH</a>
        <a href="#LINK_OVERLIBHEIGHT">OVERLIBHEIGHT</a>
        <a href="#LINK_OVERLIBCAPTION">OVERLIBCAPTION</a>
        <a href="#LINK_NOTES">NOTES</a>
        <a href="#LINK_VIA">VIA</a>
        <a href="#LINK_ARROWSTYLE">ARROWSTYLE</a>
        <a href="#LINK_SET">SET</a>
      </p>
      <h4 class="configsection">Global Configuration Directives</h4>
      <p id="context_GLOBAL">
        <a href="#GLOBAL_BACKGROUND">BACKGROUND</a>
        <a href="#GLOBAL_WIDTH">WIDTH</a>
        <a href="#GLOBAL_HEIGHT">HEIGHT</a>
        <a href="#GLOBAL_HTMLOUTPUTFILE">HTMLOUTPUTFILE</a>
        <a href="#GLOBAL_IMAGEOUTPUTFILE">IMAGEOUTPUTFILE</a>
        <a href="#GLOBAL_FONTDEFINE">FONTDEFINE</a>
        <a href="#GLOBAL_FONT">*FONT</a>
        <a href="#GLOBAL_COLORS">*COLOR</a>
        <a href="#GLOBAL_TIMEPOS">TIMEPOS</a>
        <a href="#GLOBAL_TITLE">TITLE</a>
        <a href="#GLOBAL_TITLEPOS">TITLEPOS</a>
        <a href="#GLOBAL_KILO">KILO</a>
        <a href="#GLOBAL_HTMLSTYLE">HTMLSTYLE</a>
        <a href="#GLOBAL_SCALE">SCALE</a>
        <a href="#GLOBAL_KEYPOS">KEYPOS</a>
        <a href="#GLOBAL_KEYSTYLE">KEYSTYLE</a>
        <a href="#GLOBAL_SET">SET</a>
      </p>
    </div></div>
        

    <h1 id="s_scope_NODE" class="configsection">Node-specific Configuration Directives</h1>
          <div class="referenceentry">
<h2><a name="NODE_NODE">NODE</a></h2>
<div class="definition">NODE <em class="meta">nodename</em>
</div>
<div class="description">
<p>The initial definition of a NODE. This must come before any other configuration related to this node.</p><p>The 'nodename' is used in link definitions to specify which nodes the link joins. The nodename is must be a single 
 word, with no spaces.</p><p>There is one special node name, 'DEFAULT', which allows for the setting of defaults. 
 All nodes that are defined after this one in the configuration file will use the parameters 
 of this node as a starting point. For this reason, it is best to define the DEFAULT node at the 
 top of the configuration file, if you intend to use it.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.7</dt>
<dd>Added DEFAULT node.</dd>
</dl>
</div>
</div>
                      <div class="referenceentry">
<h2><a name="NODE_POSITION">POSITION</a></h2>
<div class="definition">POSITION <em class="meta">x-coord</em> <em class="meta">y-coord</em>
</div>
<div class="definition">POSITION <em class="meta">nodename</em> <em class="meta">x-coord</em> <em class="meta">y-coord</em>
</div>
<div class="description">
<p>Specifies where to place the node on the map. Coordinates are in pixel units, with the origin at the top-left of the map.</p><p>Optionally, you can also specify another node that the coordinates are relative to. This allows you to have 'sub-nodes' that follow a master node around as you alter the map. Relative nodes can be relative to other relative nodes, as long as the node at the end of the chain is not relatively positioned!</p> 
</div>
<div class="examples">
<h3>Examples</h3>
<div class="example">
<h5>Example of a 'sub-node', that will be 20 pixels above the main node, wherever that gets moved to. It is used to show additional information about the main node.</h5>
<pre>
        NODE main_node
            POSITION 200 320
            LABEL MAIN
            
        NODE sub_node
            POSITION main_node 0 -20
            LABEL {nodes:main_node:invalue}
        </pre>
</div>
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Add relative position from other nodes.</dd>
</dl>
</div>
</div>
            <div class="referenceentry">
<h2><a name="NODE_LABEL">LABEL</a></h2>
<div class="definition">LABEL <em class="meta">labeltext</em>
</div>
<div class="description">
<p>Specifies a label for the node. Everything to the end of the line is used.</p><p>If the node has an <a href="#NODE_ICON">ICON</a> defined as well, then you can specify the position of the label relative to the node's centre-point by using <a href="#NODE_LABELOFFSET">LABELOFFSET.</a> </p><p>The text for the label can contain <a href="advanced.html#tokens">special tokens</a> to show map data.</p><p>This is drawn using the font specified by <a href="#NODE_LABELFONT">LABELFONT</a> in the colours specified by LABELFONTCOLOR, LABELFONTSHADOWCOLOR, LABELBGCOLOR and LABELOUTLINECOLOR.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Added 'special token' support.</dd>
</dl>
</div>
</div>
            <div class="referenceentry">
<h2><a name="NODE_TARGET">TARGET</a></h2>
<div class="definition">TARGET <em class="meta">targetspec</em>
</div>
<div class="description">
<p>Specifies where to look for the current "throughput" 
 information for this <a href="#NODE_NODE">NODE.</a> You can also specify multiple targets, which will then be added together to make the aggregate result 
which is then displayed. Specify the targets on one TARGET line, seperated with a space. If a targetspec starts with a '-', then it's value will be <i>subtracted</i> from the final result instead.</p><p>It's important to note, especially for NODEs, that the value that is used does not have to be bandwidth. You can use data for temperature, session-counts, CPU usage or anything else you can get data for.</p><p>The actual contents of the <em>targetspec</em> depend on the data source plugins that are 
 available. <a href="targets.html">The standard plugins are documented here</a>.</p> 
</div>
<div class="examples">
<h3>Examples</h3>
<div class="example">
<h5>Using multiple data sources for one link</h5>
<pre>TARGET link1a.rrd  link1b.rrd</pre>
</div>
<div class="example">
<h5>Taking the input from one file, and output from another</h5>
<pre>TARGET poot.rrd:-:DS1 poot2.rrd:DS0:-</pre>
</div>
<div class="example">
<h5>A suitable tab-delimited data file</h5>
<pre>link1    3M    4M
link2    66K   1.8M
link3    34.6K 113</pre>
</div>
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.91</dt>
<dd>Added 'negative' datasources.</dd>
<dt>0.9</dt>
<dd>Added plugin data sources, node targets, and added new plugins.</dd>
<dt>0.8</dt>
<dd>Added ability to specify multiple targets. Added tab-delimited data source. Added 'ignore' DS name.</dd>
<dt>0.5</dt>
<dd>Added ability to specify DS names.</dd>
</dl>
</div>
</div>
            <div class="referenceentry">
<h2><a name="NODE_USESCALE">USESCALE</a></h2>
<div class="definition">USESCALE <em class="meta">scalename</em>
</div>
<div class="definition">USESCALE <em class="meta">scalename</em> <em class="meta">{in,out}</em>
</div>
<div class="description">
<p>Specify which <a href="#GLOBAL_SCALE">SCALE</a> to use to decide the colour of this node.</p><p>After the percentage usage is calculated (using BANDWIDTH/MAXVALUE and data from the <a href="#NODE_TARGET">TARGET</a> line), 
 the colour is decided by looking up the percentage against this <a href="#GLOBAL_SCALE">SCALE.</a> If there is no USESCALE 
 line, then the default scale is used.</p><p>For nodes, you can also specify a scalename of 'none'. This stops the node's colour from changing at all. This is useful if you want to 
 use the <a href="#NODE_TARGET">TARGET</a> line to fetch data that is used in the <a href="#NODE_LABEL">LABEL</a> or <a href="#NODE_ICON">ICON</a> of the node, for example, without changing the colour of the node itself.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Added named scales and USESCALE.</dd>
</dl>
</div>
</div>
            <div class="referenceentry">
<h2><a name="NODE_MAXVALUE">MAXVALUE</a></h2>
<div class="definition">MAXVALUE <em class="meta">max-value</em>
</div>
<div class="definition">MAXVALUE <em class="meta">max-in-value</em> <em class="meta">max-out-value</em>
</div>
<div class="description">
<p>Specifies the maximum value(s) for the node, in the same way that <a href="#LINK_BANDWIDTH">BANDWIDTH</a> does for a <a href="#LINK_LINK">LINK.</a> These are used to calculate the percentage usage value, which in turn is used to decide the NODE's colour, if it has a <a href="#NODE_TARGET">TARGET</a> defined.</p><p>The default value is 100, which has the effect of not changing the input value ( (n/100)*100 = n ).</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Added TARGET and MAXVALUE for nodes.</dd>
</dl>
</div>
</div>
                        <div class="referenceentry">
<h2><a name="NODE_ICON">ICON</a></h2>
<div class="definition">ICON <em class="meta">iconimagefile</em>
</div>
<div class="definition">ICON <em class="meta">maxwidth</em> <em class="meta">maxheight</em> <em class="meta">iconimagefile</em>
</div>
<div class="definition">ICON none</div>
<div class="description">
<p>Specifies an icon to use for the node.</p><p>The filename can either be a full path to the image, or a relative one. </p><p>The icon file must be in PNG, JPEG or GIF format. Alpha-transparency within the icon should be honoured by Weathermap for PNG icons, to create irregular shapes.</p><p>If you specify the word 'none' as the icon filename, then no icon is used. This is useful if you have specified an ICON in the DEFAULT <a href="#NODE_NODE">NODE,</a> and want to override that for a few special cases.</p><p>The second form allows you to specify a maximum width and height for the icon. If the PNG file that you specify is bigger or smaller than this size, then it is automatically scaled up (or down) in proportion, so that it fits into a box of the size you specify.</p><p>The size of the icon image is used by <a href="#NODE_LABELOFFSET">LABELOFFSET</a> to decided how far to move the label, if you use compass-point offsets.</p><p>The text for the filename can contain <a href="advanced.html#tokens">special tokens</a> to select an icon based on map data.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Added 'special token' support.</dd>
<dt>0.9</dt>
<dd>Added JPEG and GIF support.</dd>
<dt>0.9</dt>
<dd>Added special icon 'none', and automatic scaling.</dd>
</dl>
</div>
</div>
            <div class="referenceentry">
<h2><a name="NODE_LABELOFFSET">LABELOFFSET</a></h2>
<div class="definition">LABELOFFSET <em class="meta">compass-point</em>
</div>
<div class="definition">LABELOFFSET <em class="meta">x-offset</em> <em class="meta">y-offset</em>
</div>
<div class="description">
<p>If you specify an <a href="#NODE_ICON">ICON,</a> and also a <a href="#NODE_LABEL">LABEL,</a> then you will find that the label is often hard to read. 
 LABELOFFSET allows you to move the position of the <a href="#NODE_LABEL">LABEL,</a> so that it's not directly over the centre 
 of the node anymore. </p><p>You can specify a compass-point (e.g. LABELOFFSET S). The compass-point method takes the size of the 
 <a href="#NODE_ICON">ICON,</a> and uses that as the offset distance in the direction you specify. This way, you can change your 
 icon for something of a different size, and not need to change all your offsets. You can use the main 
 8 points of the compass: N, E, S, W, NE, SE, NW, SW.</p><p>For more control, you can specify an integer offset for the x and y positions of the label (e.g. LABELOFFSET -10 -20) instead.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.7</dt>
<dd>Originally added LABELOFFSET</dd>
</dl>
</div>
</div>
            <div class="referenceentry">
<h2><a name="NODE_LABELFONT">LABELFONT</a></h2>
<div class="definition">LABELFONT <em class="meta">fontnumber</em>
</div>
<div class="description">
<p>Specify the font used for drawing the LABEL.</p><p>Fonts are specified by number. The GD library that Weathermap uses has 5 built-in fonts, 1-5. You can define new fonts based on TrueType or GD fonts by using the <a href="#GLOBAL_FONTDEFINE">FONTDEFINE</a> directive.</p><p><img src="../images/font-sizes.png"></img>The built-in GD fonts.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.7</dt>
<dd>Global NODEFONT became per-node LABELFONT.</dd>
<dt>0.6</dt>
<dd>Originally added NODEFONT.</dd>
</dl>
</div>
</div>
                             <div class="referenceentry">
<h2><a name="NODE_COLORS">*COLOR</a></h2>
<div class="definition">LABELFONTCOLOR <em class="meta">red</em> <em class="meta">green</em> <em class="meta">blue</em>
</div>
<div class="definition">LABELFONTSHADOWCOLOR <em class="meta">red</em> <em class="meta">green</em> <em class="meta">blue</em>
</div>
<div class="definition">LABELBGCOLOR <em class="meta">red</em> <em class="meta">green</em> <em class="meta">blue</em>
</div>
<div class="definition">LABELOUTLINECOLOR <em class="meta">red</em> <em class="meta">green</em> <em class="meta">blue</em>
</div>
<div class="description">
<p>Specify the colours used for drawing the LABEL.</p><p>red, green and blue are numbers from 0 to 255.</p><p>LABELFONTSHADOWCOLOR, LABELBGCOLOR and LABELOUTLINECOLOR have an additional option - 'none' - which stops that element of the <a href="#NODE_LABEL">LABEL</a> being drawn. LABELFONTSHADOWCOLOR defaults to 'none'.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.8</dt>
<dd>Added LABELFONTCOLOR, LABELFONTSHADOWCOLOR, LABELBGCOLOR and LABELOUTLINECOLOR.</dd>
</dl>
</div>
</div>
          <div class="referenceentry">
<h2><a name="NODE_INFOURL">INFOURL</a></h2>
<div class="definition">INFOURL <em class="meta">url</em>
</div>
<div class="description">
<p>Creates a hyperlink in the HTML output.</p><p>If you are using the HTML output facility, then a link is added to the 
 &lt;map&gt; section of the HTML so that when you click on the node, you are 
 taken to the url specified here.</p> 
</div>
</div>
                  <div class="referenceentry">
<h2><a name="NODE_OVERLIBGRAPH">OVERLIBGRAPH</a></h2>
<div class="definition">OVERLIBGRAPH <em class="meta">url</em>
</div>
<div class="description">
<p>Creates a popup image in the HTML output.</p><p>If you are using the HTML output facility, and <a href="#GLOBAL_HTMLSTYLE">HTMLSTYLE</a> is set to 'overlib', then a link is added to the 
 &lt;map&gt; section of the HTML so that when you move the mouse pointer over the the node, a box will pop up 
 containing the image that you specify. Typically used to link to historical data in your network monitoring system.</p><p>If a <a href="#NODE_NOTES">NOTES</a> line is also specified for a node, then the image specified here appears with the <a href="#NODE_NOTES">NOTES</a> text underneath it.</p> 
</div>
<div class="examples">
<h3>Examples</h3>
<div class="example">
<h5>Typical use of OVERLIBGRAPH</h5>
<pre>OVERLIBGRAPH http://www.yoursite.net/mrtg/router1-cpu-daily.png</pre>
</div>
</div>
</div>
            <div class="referenceentry">
<h2><a name="NODE_OVERLIBWIDTH">OVERLIBWIDTH</a></h2>
<div class="definition">OVERLIBWIDTH <em class="meta">imagewidth</em>
</div>
<div class="description">
<p>Specify the width, in pixels of the graph image referred to by <a href="#NODE_OVERLIBGRAPH">OVERLIBGRAPH</a> line.</p><p>This is an optional extra that allows the OverLib library to make a better job of 
 positioning the 'popup' image so that it doesn't appear off the edge of the screen. 
 Typically, you would use this once, in the DEFAULT <a href="#NODE_NODE">NODE.</a> If you use this, you must 
 also use <a href="#NODE_OVERLIBHEIGHT">OVERLIBHEIGHT,</a> for either to have any effect.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.7</dt>
<dd>Originally added OVERLIBWIDTH and OVERLIBHEIGHT based on code by Niels Baggesen.</dd>
</dl>
</div>
</div>
                  <div class="referenceentry">
<h2><a name="NODE_OVERLIBHEIGHT">OVERLIBHEIGHT</a></h2>
<div class="definition">OVERLIBHEIGHT <em class="meta">imagewidth</em>
</div>
<div class="description">
<p>Specify the width, in pixels of the graph image referred to by <a href="#NODE_OVERLIBGRAPH">OVERLIBGRAPH</a> line.</p><p>This is an optional extra that allows the OverLib library to make a better job of 
 positioning the 'popup' image so that it doesn't appear off the edge of the screen. 
 Typically, you would use this once, in the DEFAULT <a href="#NODE_NODE">NODE.</a> If you use this, you must 
 also use <a href="#NODE_OVERLIBWIDTH">OVERLIBWIDTH,</a> for either to have any effect.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.7</dt>
<dd>Originally added OVERLIBWIDTH and OVERLIBHEIGHT based on code by Niels Baggesen.</dd>
</dl>
</div>
</div>
                  <div class="referenceentry">
<h2><a name="NODE_OVERLIBCAPTION">OVERLIBCAPTION</a></h2>
<div class="definition">OVERLIBCAPTION <em class="meta">caption text</em>
</div>
<div class="description">
<p>Specify the caption used for the popup HTML 'window' if you have also specified an <a href="#NODE_OVERLIBGRAPH">OVERLIBGRAPH</a> line. By default, this is the name of the NODE.</p><p>The text for the caption can contain <a href="advanced.html#tokens">special tokens</a> to show map data.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Originally added OVERLIBCAPTION.</dd>
</dl>
</div>
</div>
                  <div class="referenceentry">
<h2><a name="NODE_NOTES">NOTES</a></h2>
<div class="definition">NOTES <em class="meta">notes text</em>
</div>
<div class="description">
<p>Specifies the text or HTML notes for a node. </p><p>The <em>notes text</em> appears in a popup box when the user hovers their mouse over the node. If an <a href="#NODE_OVERLIBGRAPH">OVERLIBGRAPH</a> is specified too, then the text appears below the graph.</p><p>The map <a href="#GLOBAL_HTMLSTYLE">HTMLSTYLE</a> must be set to 'overlib' to enable any of the mouse-hover functionality.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Originally added NOTES.</dd>
</dl>
</div>
</div>
                  <div class="referenceentry">
<h2><a name="NODE_SET">SET</a></h2>
<div class="definition">SET <em class="meta">hintname</em> <em class="meta">hintvalue</em>
</div>
<div class="description">
<p>Specifies a value for a <em>hint variable</em>.</p><p>Hint Variables allow the user to pass settings to the internals of Weathermap that 
 wouldn't normally need to be changed, or that aren't part of the core Weathermap application. 
 Examples are: small rendering changes, parameters for datasources plugins and similar.</p><p>Hint Variables are either Global for the map, or assigned to a specific link or node.</p><p>There is more about Hint Variables in the <a href="advanced.html">Advanced Topics</a> section.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Originally added SET.</dd>
</dl>
</div>
</div>
    

        <h1 id="s_scope_LINK" class="configsection">Link-specific Configuration Directives</h1>
                  <div class="referenceentry">
<h2><a name="LINK_LINK">LINK</a></h2>
<div class="definition">LINK <em class="meta">linkname</em>
</div>
<div class="description">
<p>The first line of a LINK definition.</p><p>The linkname must 
 be unique within the map, and must not contain spaces. The only place it currently appears is 
 in the small title-bar of a popup graph if you specify an 
 <a href="#LINK_OVERLIBGRAPH">OVERLIBGRAPH</a> without an <a href="#LINK_OVERLIBCAPTION">OVERLIBCAPTION,</a> however.</p><p>There is one special link name, 'DEFAULT', which allows for the setting of defaults. 
 All links that are defined after this one in the configuration file will use the parameters 
 of this link as a starting point. For this reason, it is best to define the DEFAULT link at the 
 top of the configuration file, if you intend to use it.</p> 
</div>
</div>
                  <div class="referenceentry">
<h2><a name="LINK_NODES">NODES</a></h2>
<div class="definition">NODES <em class="meta">nodename{:compassoffset}</em> <em class="meta">nodename{:compassoffset}</em>
</div>
<div class="definition">NODES <em class="meta">nodename{:xoffset:yoffset}</em> <em class="meta">nodename{:xoffset:yoffset}</em>
</div>
<div class="description">
<p>These are the NODEs that this link joins. There can be 
 only two. They are the 'nodename's from the <a href="#NODE_NODE">NODE</a> line for 
 each node.</p><p>Optionally, you can add an offset after a nodename, to move the location of that end of the link. This can help with crowded areas of the map, and also in making parallel links. Valid offsets are named after compass-points: N,S,E,W,NE,NE,SE,SW, or they can be numeric values, to indicate the relative position in pixels from the centre of the node.</p><p>The order of the nodes is significant. When reading data sources, the flow from the first node to the second is considered 'out' and from second-to-first is 'in'.</p> 
</div>
<div class="examples">
<h3>Examples</h3>
<div class="example">
<h5>Defining a simple link</h5>
<pre>LINK mylink
  NODES node1 node2</pre>
</div>
<div class="example">
<h5>Two parallel links, using offsets</h5>
<pre>LINK firstlink
  NODES node1:E node2:E

LINK secondlink
  NODES node1:W node2:W</pre>
</div>
<div class="example">
<h5>An offset link using pixel offsets</h5>
<pre>LINK firstlink
  NODES node1:-10:10 node2:20:12
        </pre>
</div>
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Added numeric pixel offsets.</dd>
<dt>0.8</dt>
<dd>Added ability to specify node offset.</dd>
</dl>
</div>
</div>
                  <div class="referenceentry">
<h2><a name="LINK_TARGET">TARGET</a></h2>
<div class="definition">TARGET <em class="meta">targetspec</em>
</div>
<div class="description">
<p>Specifies where to look for the current throughput 
 information for this <a href="#LINK_LINK">LINK.</a> You can also specify multiple targets, which will then be added together to make the aggregate bandwidth 
which is then displayed. Specify the targets on one TARGET line, seperated with a space. If a targetspec starts with a '-', then it's value will be <i>subtracted</i> from the final result instead.</p><p>The actual contents of the <em>targetspec</em> depend on the data source plugins that are 
 available. <a href="targets.html">The standard plugins are documented here</a>.</p> 
</div>
<div class="examples">
<h3>Examples</h3>
<div class="example">
<h5>Using multiple data sources for one link</h5>
<pre>TARGET link1a.rrd  link1b.rrd</pre>
</div>
<div class="example">
<h5>Taking the input from one file, and output from another</h5>
<pre>TARGET poot.rrd:-:DS1 poot2.rrd:DS0:-</pre>
</div>
<div class="example">
<h5>A suitable tab-delimited data file</h5>
<pre>link1    3M    4M
link2    66K   1.8M
link3    34.6K 113</pre>
</div>
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.91</dt>
<dd>Added 'negative' datasources.</dd>
<dt>0.9</dt>
<dd>Added plugin data sources, node targets, and added new plugins.</dd>
<dt>0.8</dt>
<dd>Added ability to specify multiple targets. Added tab-delimited data source. Added 'ignore' DS name.</dd>
<dt>0.5</dt>
<dd>Added ability to specify DS names.</dd>
</dl>
</div>
</div>
                  <div class="referenceentry">
<h2><a name="LINK_USESCALE">USESCALE</a></h2>
<div class="definition">USESCALE <em class="meta">scalename</em>
</div>
<div class="description">
<p>Specify which <a href="#GLOBAL_SCALE">SCALE</a> to use to decide the colour of this link.</p><p>After the percentage usage is calculated (using <a href="#LINK_BANDWIDTH">BANDWIDTH</a> and data from the <a href="#LINK_TARGET">TARGET</a> line), 
 the colour is decided by looking up the percentage against this <a href="#GLOBAL_SCALE">SCALE.</a> If there is no USESCALE 
 line, then the default scale is used.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Added named scales and USESCALE.</dd>
</dl>
</div>
</div>
                  <div class="referenceentry">
<h2><a name="LINK_WIDTH">WIDTH</a></h2>
<div class="definition">WIDTH <em class="meta">width</em>
</div>
<div class="description"><p>Specifies the width of this link when drawn, in pixels.</p></div>
</div>
                  <div class="referenceentry">
<h2><a name="LINK_BANDWIDTH">BANDWIDTH</a></h2>
<div class="definition">BANDWIDTH <em class="meta">max-bandwidth</em>
</div>
<div class="definition">BANDWIDTH <em class="meta">max-in-bandwidth</em> <em class="meta">max-out-bandwidth</em>
</div>
<div class="description">
<p>Specifies the maximum throughput of this link, in bits per second.</p><p>This is used to calculate the percentage utilisation, which in turn is used to make the 
colour for the link arrow, and optionally the label on the link.</p><p>The second form allows you to have 'asymmetric' links, like an ADSL, where the first number is the maximum 
bandwidth from node1 to node2 and the second is the maximum from node2 to node1, as they are 
given in the <a href="#LINK_NODES">NODES</a> line.</p><p>Bandwidths can also use K,M,G and T suffixes to specify large values. Also see the <a href="#GLOBAL_KILO">KILO</a> global option though.</p> 
</div>
<div class="examples">
<h3>Examples</h3>
<div class="example">
<h5>A typical ADSL line (as seen from the CPE)</h5>
<pre>BANDWIDTH 2M 256K</pre>
</div>
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Added MAXVALUE as a synonym to match NODE MAXVALUE. No change in functionality.</dd>
<dt>0.5</dt>
<dd>Added support for decimals in BANDWIDTH specifications.</dd>
<dt>0.4</dt>
<dd>Added support for K,M,G,T suffixes on bandwidth specs. Changed bandwidth from bytes to bits.</dd>
</dl>
</div>
</div>
                <div class="referenceentry">
<h2><a name="LINK_BWLABEL">BWLABEL</a></h2>
<div class="definition">BWLABEL <em class="meta">formatname</em>
</div>
<div class="description">
<p>Specifies the type of 'bandwidth' label shown on each link.</p><p>The default is 'percent', but you can also have 'none', 'unformatted' or 'bits'. 
 'bits' shows the actual bandwidth, formatted using K,M,T,G suffixes where appropriate. 
 'unformatted' takes the value from the <a href="#LINK_TARGET">TARGET</a> and displays it without any formatting - 
 this can be useful for mapping things other than bandwidth. 
 'none' hides the bandwidth label altogether. 
 </p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.8</dt>
<dd>Added unformatted format.</dd>
<dt>0.7</dt>
<dd>Changed from global BWLABELS to per-link BWLABEL.</dd>
</dl>
</div>
</div>
                <div class="referenceentry">
<h2><a name="LINK_BWLABELPOS">BWLABELPOS</a></h2>
<div class="definition">BWLABELPOS <em class="meta">inposition</em> <em class="meta">outposition</em>
</div>
<div class="description">
<p>Specifies the position of the 'bandwidth' labels shown on each link.</p><p>The two position values are percentages along the link arrow, from the first to the second node. Therefore <tt>BWLABELPOS 75 25</tt> is the default.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Added BWLABELPOS</dd>
</dl>
</div>
</div>
                <div class="referenceentry">
<h2><a name="LINK_BWFONT">BWFONT</a></h2>
<div class="definition">BWFONT <em class="meta">fontnumber</em>
</div>
<div class="description">
<p>Specify the font used for drawing the <a href="#LINK_BWLABEL">BWLABEL</a> boxes.</p><p>Fonts are specified by number. The GD library that Weathermap uses has 5 built-in fonts, 1-5. You can define new fonts based on TrueType or GD fonts by using the <a href="#GLOBAL_FONTDEFINE">FONTDEFINE</a> directive.</p><p><img src="../images/font-sizes.png"></img>The built-in GD fonts.</p> 
</div>
</div>
                <div class="referenceentry">
<h2><a name="LINK_INCOMMENT">INCOMMENT</a></h2>
<div class="definition">INCOMMENT <em class="meta">string</em>
</div>
<div class="description">
<p>Specifies a comment for the input side of a LINK.</p><p>The link comment appears as text running alongside the link arrow. The font used is governed by <a href="#LINK_COMMENTFONT">COMMENTFONT</a> and the colour by COMMENTFONTCOLOR.</p><p>The text for the comment can contain <a href="advanced.html#tokens">special tokens</a> to show map data.</p><p>The <a href="#LINK_COMMENTFONT">COMMENTFONT</a> <em>must be a TrueType font</em> as these are the only font type to support rotating text.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Added link comments</dd>
</dl>
</div>
</div>
                <div class="referenceentry">
<h2><a name="LINK_OUTCOMMENT">OUTCOMMENT</a></h2>
<div class="definition">OUTCOMMENT <em class="meta">string</em>
</div>
<div class="description">
<p>Specifies a comment for the output side of a LINK.</p><p>The link comment appears as text running alongside the link arrow. The font used is governed by <a href="#LINK_COMMENTFONT">COMMENTFONT</a> and the colour by COMMENTFONTCOLOR.</p><p>The text for the comment can contain <a href="advanced.html#tokens">special tokens</a> to show map data.</p><p>The <a href="#LINK_COMMENTFONT">COMMENTFONT</a> <em>must be a TrueType font</em> as these are the only font type to support rotating text.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Added link comments</dd>
</dl>
</div>
</div>
                <div class="referenceentry">
<h2><a name="LINK_COMMENTFONT">COMMENTFONT</a></h2>
<div class="definition">COMMENTFONT <em class="meta">fontnumber</em>
</div>
<div class="description">
<p>Specify the font used for drawing the <a href="#LINK_INCOMMENT">INCOMMENT</a> and <a href="#LINK_OUTCOMMENT">OUTCOMMENT</a> text.</p><p>Fonts are specified by number. The GD library that Weathermap uses has 5 built-in fonts, 1-5. You can define new fonts based on TrueType or GD fonts by using the <a href="#GLOBAL_FONTDEFINE">FONTDEFINE</a> directive.</p><p>For Link Comments, you <em>must</em> define a TrueType font. These are the only font that can rotate text through any angle, as required by comments.</p><changes> 
 <change version="0.9">Added link comments</change> 
 </changes> 
</div>
</div>
            <div class="referenceentry">
<h2><a name="LINK_COLORS">*COLOR</a></h2>
<div class="definition">OUTLINECOLOR <em class="meta">red</em> <em class="meta">green</em> <em class="meta">blue</em>
</div>
<div class="definition">BWOUTLINECOLOR <em class="meta">red</em> <em class="meta">green</em> <em class="meta">blue</em>
</div>
<div class="definition">BWFONTCOLOR <em class="meta">red</em> <em class="meta">green</em> <em class="meta">blue</em>
</div>
<div class="definition">BWBOXCOLOR <em class="meta">red</em> <em class="meta">green</em> <em class="meta">blue</em>
</div>
<div class="definition">COMMENTCOLOR <em class="meta">red</em> <em class="meta">green</em> <em class="meta">blue</em>
</div>
<div class="description">
<p>Specify the colours used for drawing the link.</p><p>red, green and blue are numbers from 0 to 255.</p><p>OUTLINECOLOR, BWOUTLINECOLOR and BWBOXCOLOR have an additional option - 'none' - which stops that element of the link being drawn. </p><p>The colours are used as follows:<ul><li>OUTLINECOLOR is the colour of the line around the edge of the arrow.</li> 
 <li>BWOUTLINECOLOR is the colour of the line surrounding the 'bandwidth label' box</li> 
 <li>BWBOXCOLOR is the background colour for the same box</li> 
 <li>BWFONTCOLOR is the colour used for text within that box</li> 
 <li>COMMENTCOLOR is the colour used for the text produced by <a href="#LINK_INCOMMENT">INCOMMENT</a> and <a href="#LINK_OUTCOMMENT">OUTCOMMENT,</a> along the side of a link arrow</li></ul></p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Added COMMENTCOLOR.</dd>
<dt>0.8</dt>
<dd>Added OUTLINECOLOR, BWOUTLINECOLOR, BWFONTCOLOR and BWBOXCOLOR.</dd>
</dl>
</div>
</div>
                  <div class="referenceentry">
<h2><a name="LINK_INFOURL">INFOURL</a></h2>
<div class="definition">INFOURL <em class="meta">url</em>
</div>
<div class="description">
<p>Creates a hyperlink in the HTML output.</p><p>If you are using the HTML output facility, then a link is added to the 
 &lt;map&gt; section of the HTML so that when you click on the (weathermap) link, you are 
 taken to the url specified here.</p> 
</div>
</div>
                  <div class="referenceentry">
<h2><a name="LINK_OVERLIBGRAPH">OVERLIBGRAPH</a></h2>
<div class="definition">OVERLIBGRAPH <em class="meta">url</em>
</div>
<div class="description">
<p>Creates a popup image in the HTML output.</p><p>If you are using the HTML output facility, and <a href="#GLOBAL_HTMLSTYLE">HTMLSTYLE</a> is set to 'overlib', then a link is added to the 
 &lt;map&gt; section of the HTML so that when you move the mouse pointer over the the (weathermap) link, a box will pop up 
 containing the image that you specify. Typically used to link to historical data in your network monitoring system.</p><p>If a <a href="#LINK_NOTES">NOTES</a> line is also specified for a link, then the image specified here appears with the <a href="#LINK_NOTES">NOTES</a> text underneath it.</p> 
</div>
<div class="examples">
<h3>Examples</h3>
<div class="example">
<h5>Typical use of OVERLIBGRAPH</h5>
<pre>OVERLIBGRAPH http://www.yoursite.net/mrtg/router1-link2-daily.png</pre>
</div>
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.0pre</dt>
<dd>Odd fact: This command, and the accompanying code to generate overlib imagemaps, were the first modification I ever made to the GRNET perl weathermap,
                and was what got me interested in writing my own version.</dd>
</dl>
</div>
</div>
                  <div class="referenceentry">
<h2><a name="LINK_OVERLIBWIDTH">OVERLIBWIDTH</a></h2>
<div class="definition">OVERLIBWIDTH <em class="meta">imagewidth</em>
</div>
<div class="description">
<p>Specify the width, in pixels of the graph image referred to by <a href="#LINK_OVERLIBGRAPH">OVERLIBGRAPH</a> line.</p><p>This is an optional extra that allows the OverLib library to make a better job of 
 positioning the 'popup' image so that it doesn't appear off the edge of the screen. 
 Typically, you would use this once, in the DEFAULT link. If you use this, you must 
 also use <a href="#LINK_OVERLIBHEIGHT">OVERLIBHEIGHT,</a> for either to have any effect.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.7</dt>
<dd>Originally added OVERLIBWIDTH and OVERLIBHEIGHT based on code by Niels Baggesen.</dd>
</dl>
</div>
</div>
                  <div class="referenceentry">
<h2><a name="LINK_OVERLIBHEIGHT">OVERLIBHEIGHT</a></h2>
<div class="definition">OVERLIBHEIGHT <em class="meta">imagewidth</em>
</div>
<div class="description">
<p>Specify the width, in pixels of the graph image referred to by <a href="#LINK_OVERLIBGRAPH">OVERLIBGRAPH</a> line.</p><p>This is an optional extra that allows the OverLib library to make a better job of 
 positioning the 'popup' image so that it doesn't appear off the edge of the screen. 
 Typically, you would use this once, in the DEFAULT link. If you use this, you must 
 also use <a href="#LINK_OVERLIBWIDTH">OVERLIBWIDTH,</a> for either to have any effect.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.7</dt>
<dd>Originally added OVERLIBWIDTH and OVERLIBHEIGHT based on code by Niels Baggesen.</dd>
</dl>
</div>
</div>
                  <div class="referenceentry">
<h2><a name="LINK_OVERLIBCAPTION">OVERLIBCAPTION</a></h2>
<div class="definition">OVERLIBCAPTION <em class="meta">caption text</em>
</div>
<div class="description">
<p>Specify the caption used for the popup HTML 'window' if you have also specified an <a href="#LINK_OVERLIBGRAPH">OVERLIBGRAPH</a> line. By default, this is the name of the LINK.</p><p>The text for the caption can contain <a href="advanced.html#tokens">special tokens</a> to show map data.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Originally added OVERLIBCAPTION.</dd>
</dl>
</div>
</div>
                  <div class="referenceentry">
<h2><a name="LINK_NOTES">NOTES</a></h2>
<div class="definition">NOTES <em class="meta">notes text</em>
</div>
<div class="description">
<p>Specifies the text or HTML notes for a link. </p><p>The <em>notes text</em> appears in a popup box when the user hovers their mouse over the link. If an <a href="#LINK_OVERLIBGRAPH">OVERLIBGRAPH</a> is specified too, then the text appears below the graph.</p><p>The map <a href="#GLOBAL_HTMLSTYLE">HTMLSTYLE</a> must be set to 'overlib' to enable any of the mouse-hover functionality.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Originally added NOTES.</dd>
</dl>
</div>
</div>
                  <div class="referenceentry">
<h2><a name="LINK_VIA">VIA</a></h2>
<div class="definition">VIA <em class="meta">x-coord</em> <em class="meta">y-coord</em>
</div>
<div class="description">
<p>Specify an additional point that a link must pass through.</p><p>A link normally goes in a straight line between the two nodes listed in the <a href="#LINK_NODES">NODES</a> configuration line. 
 If you need it to go around something else, or to seperate two parallel links so that the bandwidth labels 
 are all visible, you can make the link curve.</p><p>If you specify multiple VIA lines, then the link will pass through each in turn, in the order they are specified.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.8</dt>
<dd>Originally added VIA.</dd>
</dl>
</div>
</div>
                  <div class="referenceentry">
<h2><a name="LINK_ARROWSTYLE">ARROWSTYLE</a></h2>
<div class="definition">ARROWSTYLE <em class="meta">stylename</em>
</div>
<div class="definition">ARROWSTYLE <em class="meta">width</em> <em class="meta">length</em>
</div>
<div class="description">
<p>Specifies the style of arrowhead used for drawing links.</p><p>The default is 'classic' which has a wide arrowhead. You can also choose 'compact' which gives narrower heads.</p><p>Finally, you can get finer control by adjusting the size yourself. The width and length of the head are in units of link-width.</p><p>Classic is equivalent to '4 2' and Compact is equivalent to '1 1'.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.8</dt>
<dd>Added custom numeric form.</dd>
<dt>0.7</dt>
<dd>First added.</dd>
</dl>
</div>
</div>
                <div class="referenceentry">
<h2><a name="LINK_SET">SET</a></h2>
<div class="definition">SET <em class="meta">hintname</em> <em class="meta">hintvalue</em>
</div>
<div class="description">
<p>Specifies a value for a <em>hint variable</em>.</p><p>Hint Variables allow the user to pass settings to the internals of Weathermap that 
 wouldn't normally need to be changed, or that aren't part of the core Weathermap application. 
 Examples are: small rendering changes, parameters for datasources plugins and similar.</p><p>Hint Variables are either Global for the map, or assigned to a specific link or node.</p><p>There is more about Hint Variables in the <a href="advanced.html">Advanced Topics</a> section.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Originally added SET.</dd>
</dl>
</div>
</div>
    
        
        <h1 id="s_scope_GLOBAL" class="configsection">Global Configuration Directives</h1>
          <div class="referenceentry">
<h2><a name="GLOBAL_BACKGROUND">BACKGROUND</a></h2>
<div class="definition">BACKGROUND <em class="meta">imagefile</em>
</div>
<div class="description">
<p>Specify an PNG, JPEG or GIF image file to be used as a background image.</p><p>Any <a href="#GLOBAL_WIDTH">WIDTH</a> and <a href="#GLOBAL_HEIGHT">HEIGHT</a> specifications will be ignored - the map will take the size of the background.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Added JPEG and GIF support for backgrounds.</dd>
</dl>
</div>
</div>
          <div class="referenceentry">
<h2><a name="GLOBAL_WIDTH">WIDTH</a></h2>
<div class="definition">WIDTH <em class="meta">map-width</em>
</div>
<div class="description">
<p>Specifies the width of the map image in pixels.</p><p>If a <a href="#GLOBAL_BACKGROUND">BACKGROUND</a> is specified, and the imagefile is successfully loaded, then 
 any WIDTH specified is ignored. 
 If neither a <a href="#GLOBAL_BACKGROUND">BACKGROUND</a> or WIDTH is specified, then the default WIDTH is 800 pixels.</p> 
</div>
</div>
          <div class="referenceentry">
<h2><a name="GLOBAL_HEIGHT">HEIGHT</a></h2>
<div class="definition">WIDTH <em class="meta">map-height</em>
</div>
<div class="description">
<p>Specifies the height of the map image in pixels.</p><p>If a <a href="#GLOBAL_BACKGROUND">BACKGROUND</a> is specified, and the imagefile is successfully loaded, then 
 any HEIGHT specified is ignored. 
 If neither a <a href="#GLOBAL_BACKGROUND">BACKGROUND</a> or HEIGHT is specified, then the default HEIGHT is 600 pixels.</p> 
</div>
</div>
          <div class="referenceentry">
<h2><a name="GLOBAL_HTMLOUTPUTFILE">HTMLOUTPUTFILE</a></h2>
<div class="definition">HTMLOUTPUTFILE <em class="meta">htmlfile</em>
</div>
<div class="description">
<p>This specifies the name of the HTML file that will be generated. </p><p>The equivalent command-line option takes precedence over this configuration line, if both are used. If you are generating maps using the Cacti plugin, then this directive is ignored.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.7</dt>
<dd>Added HTMLOUTPUTFILE.</dd>
</dl>
</div>
</div>
          <div class="referenceentry">
<h2><a name="GLOBAL_IMAGEOUTPUTFILE">IMAGEOUTPUTFILE</a></h2>
<div class="definition">IMAGEOUTPUTFILE <em class="meta">imagefile</em>
</div>
<div class="description">
<p>This specifies the name of the PNG, JPEG or GIF file that will be generated. The format chosen is based on the file-extension. </p><p>The equivalent command-line option takes precedence over this configuration line, if 
 both are used. </p><p>If you are generating maps using the Cacti plugin, then this directive is ignored. 
You can set the output format in the Cacti Settings page.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Added JPEG and GIF support.</dd>
<dt>0.7</dt>
<dd>Added IMAGEOUTPUTFILE.</dd>
</dl>
</div>
</div>
      <div class="referenceentry">
<h2><a name="GLOBAL_FONTDEFINE">FONTDEFINE</a></h2>
<div class="definition">FONTDEFINE <em class="meta">fontnumber</em> <em class="meta">gdfontfile</em>
</div>
<div class="definition">FONTDEFINE <em class="meta">fontnumber</em> <em class="meta">ttffontfile</em> <em class="meta">fontsize</em>
</div>
<div class="description">
<p>Defines a custom font to be used for text within the map.</p><p>By default, the GD library used by Weathermap has 5 fonts, numbered 1-5. FONTDEFINE allows you to 
 define new font numbers, and link them to fonts in two other formats.</p><p>The first format is 'GD fonts', which are a bitmapped format used by GD alone. They are not scalable, and are also 
 platform-specific (they use a different byte-order depending on the host). You should specify the full filename including any extensions.</p><p>The second format is TrueType fonts, which are scalable, standard and generally a lot nicer! This time, you need to specify the 
 size that the font should be rendered at. The size is in pixels. You can load the same font into multiple fontnumbers with 
 different sizes to use in different parts of a map.</p><p>The freetype library used in PHP makes a somewhat complex set of rules for where it will search for truetype fonts. The two easiest options are: 
 <ul><li>Use the full absolute path to your .ttf file</li> 
 <li>Keep your .ttf files in the Weathermap directory, and use the first part of the filename only, with no '.ttf' on the end.</li></ul> 
 The full set of rules is <a href="http://www.boutell.com/gd/manual2.0.33.html#gdImageStringFT">available here</a></p><p>Regardless of the format, the newly defined font can be used anywhere that you'd normally use a font number (for example, <a href="#LINK_BWFONT">BWFONT</a> or KEYFONT). 
 </p> 
</div>
<div class="examples">
<h3>Examples</h3>
<div class="example">
<h5>Defining a new Truetype font, with the font file in the weathermap directory</h5>
<pre>FONTDEFINE 10 VeraBd 16</pre>
</div>
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.8</dt>
<dd>First added FONTDEFINE</dd>
</dl>
</div>
</div>
            <div class="referenceentry">
<h2><a name="GLOBAL_FONT">*FONT</a></h2>
<div class="definition">TITLEFONT <em class="meta">fontnumber</em>
</div>
<div class="definition">KEYFONT <em class="meta">fontnumber</em>
</div>
<div class="definition">TIMEFONT <em class="meta">fontnumber</em>
</div>
<div class="description">
<p>Specify the fonts used for various text. </p><p>Fonts are specified by number. The GD library that Weathermap uses has 5 built-in fonts, 1-5. You can define new fonts based on TrueType or GD fonts by using the <a href="#GLOBAL_FONTDEFINE">FONTDEFINE</a> directive.</p><p><img src="../images/font-sizes.png"></img>The built-in GD fonts.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.8</dt>
<dd>Originally added TIMEFONT.</dd>
<dt>0.7</dt>
<dd>Originally added TIMEFONT.</dd>
<dt>0.6</dt>
<dd>Originally added KEYFONT.</dd>
</dl>
</div>
</div>
            <div class="referenceentry">
<h2><a name="GLOBAL_COLORS">*COLOR</a></h2>
<div class="definition">BGCOLOR <em class="meta">red</em> <em class="meta">green</em> <em class="meta">blue</em>
</div>
<div class="definition">TIMECOLOR <em class="meta">red</em> <em class="meta">green</em> <em class="meta">blue</em>
</div>
<div class="definition">TITLECOLOR <em class="meta">red</em> <em class="meta">green</em> <em class="meta">blue</em>
</div>
<div class="definition">KEYTEXTCOLOR <em class="meta">red</em> <em class="meta">green</em> <em class="meta">blue</em>
</div>
<div class="definition">KEYOUTLINECOLOR <em class="meta">red</em> <em class="meta">green</em> <em class="meta">blue</em>
</div>
<div class="definition">KEYBGCOLOR <em class="meta">red</em> <em class="meta">green</em> <em class="meta">blue</em>
</div>
<div class="description">
<p>Specify the colours used for drawing the global elements of the map.</p><p>red, green and blue are numbers from 0 to 255.</p><p>LABELFONTSHADOWCOLOR, LABELBGCOLOR and LABELOUTLINECOLOR have an additional option - 'none' - which stops that element of the <a href="#NODE_LABEL">LABEL</a> being drawn. LABELFONTSHADOWCOLOR defaults to 'none'.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.8</dt>
<dd>Added TIMECOLOR, TITLECOLOR, KEYTEXTCOLOR, KEYOUTLINECOLOR and KEYBGCOLOR.</dd>
<dt>0.7</dt>
<dd>Added BGCOLOR.</dd>
</dl>
</div>
</div>
      <div class="referenceentry">
<h2><a name="GLOBAL_TIMEPOS">TIMEPOS</a></h2>
<div class="definition">TIMEPOS <em class="meta">x-pos</em> <em class="meta">y-pos</em>
</div>
<div class="definition">TIMEPOS <em class="meta">x-pos</em> <em class="meta">y-pos</em> <em class="meta">formatstring</em>
</div>
<div class="description">
<p>Specifies where to draw the timestamp on the map.</p><p>If no TIMEPOS line is given, then the timestamp is drawn in the top-right corner. To hide it completely, set y to be <nobr>-200</nobr> or so.</p><p>You can optionally specify an additional parameter to change the text of the timestamp. This text can 
 contain special tokens which are substituted with parts of the current time. The default timestamp 
 text is <nobr><tt>Created: %b %d %Y %H:%M:%S</tt></nobr>. The tokens used are those accepted by the PHP strftime 
 function. For a full list see the <a href="http://www.php.net/manual/en/function.strftime.php">PHP manual page</a>.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.6</dt>
<dd>Added ability to change text.</dd>
<dt>0.5</dt>
<dd>Originally added TIMEPOS</dd>
</dl>
</div>
</div>
                  <div class="referenceentry">
<h2><a name="GLOBAL_TITLE">TITLE</a></h2>
<div class="definition">TITLEPOS <em class="meta">titlestring</em>
</div>
<div class="description">
<p>Specifies the title text. </p><p>The TITLE is shown in file-selectors for both the editor and the Cacti plugin. If you'd like the title to be shown on the map too, then add <a href="#GLOBAL_TITLEPOS">TITLEPOS</a> line also.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.8</dt>
<dd>Originally added TITLEPOS.</dd>
</dl>
</div>
</div>
            <div class="referenceentry">
<h2><a name="GLOBAL_TITLEPOS">TITLEPOS</a></h2>
<div class="definition">TITLEPOS <em class="meta">x-pos</em> <em class="meta">y-pos</em>
</div>
<div class="definition">TITLEPOS <em class="meta">x-pos</em> <em class="meta">y-pos</em> <em class="meta">headingstring</em>
</div>
<div class="description">
<p>Specifies the position of the title text. </p><p>If no TITLEPOS line is given, then no title is drawn. You can optionally specify an additional parameter, to change the title. Any text after the second coordinate is taken as a new TITLE.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.8</dt>
<dd>Originally added TITLEPOS.</dd>
</dl>
</div>
</div>
            <div class="referenceentry">
<h2><a name="GLOBAL_KILO">KILO</a></h2>
<div class="definition">KILO <em class="meta">number</em>
</div>
<div class="description">
<p>Specifies base value for kilo, mega and giga abbreviations. </p><p>Both <a href="#LINK_BANDWIDTH">BANDWIDTH</a> and <a href="#LINK_BWLABEL">BWLABEL</a> can use K,M,G,T as abbreviations for thousands, millions and so on. You can define what the multiple used is. The default is 1000.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.4</dt>
<dd>Originally added KILO.</dd>
</dl>
</div>
</div>
            <div class="referenceentry">
<h2><a name="GLOBAL_HTMLSTYLE">HTMLSTYLE</a></h2>
<div class="definition">HTMLSTYLE <em class="meta">formatname</em>
</div>
<div class="description">
<p>Specifies the HTML output style. </p><p>When HTML output is enabled, there are two variations, which you can choose between. 'static' is a basic HTML page with client-side imagemap, but no 'pop up' graphs. 'overlib' adds the use of the OverLib library to the page, so that pop up graphs can work, too. This requires Javascript, which is why 'static' is the default.</p> 
</div>
</div>
      <div class="referenceentry">
<h2><a name="GLOBAL_SCALE">SCALE</a></h2>
<div class="definition">SCALE <em class="meta">min</em> <em class="meta">max</em> <em class="meta">red</em> <em class="meta">green</em> <em class="meta">blue</em>
</div>
<div class="definition">SCALE <em class="meta">scalename</em> <em class="meta">min</em> <em class="meta">max</em> <em class="meta">red</em> <em class="meta">green</em> <em class="meta">blue</em>
</div>
<div class="definition">SCALE <em class="meta">min</em> <em class="meta">max</em> <em class="meta">red</em> <em class="meta">green</em> <em class="meta">blue</em> <em class="meta">red2</em> <em class="meta">green2</em> <em class="meta">blue2</em>
</div>
<div class="definition">SCALE <em class="meta">scalename</em> <em class="meta">min</em> <em class="meta">max</em> <em class="meta">red</em> <em class="meta">green</em> <em class="meta">blue</em> <em class="meta">red2</em> <em class="meta">green2</em> <em class="meta">blue2</em>
</div>
<div class="description">
<p>Defines one 'span' within the link colour-coding table.</p><p>SCALE is used to specify how LINKs are colour-coded according to their percent usage. 
 If the percentage usage falls between min and max then the colour specified by red, green and blue is used to colour the link. 
 Colour values are between 0 and 255. Percentages are between 0 and 100, obviously.</p><p>If you specify <i>two</i> colours on the line (the third and fourth forms above), then the colour chosen for the link will be calculated as 
 a proportion between the two colours. You can avoid specifying many SCALE lines this way.</p><p>Without a <i>scalename</i>, the SCALE line will add a definition to the scale named 'DEFAULT'. If you define any other named scales, you can then use the <a href="#LINK_USESCALE">USESCALE</a> directive to specify that a particular <a href="#NODE_NODE">NODE</a> or <a href="#LINK_LINK">LINK</a> use your new scale.</p><p>If you don't add <i>any</i> SCALE lines to a configuration file, then a default set is added for you, but as soon as you add one, you'll need to make enough to cover the whole 0-100 range to get nice colours. 
 Any percentage not matched by SCALE rules is rendered in grey.</p><p>You can specify a colour for an <em>exact</em> percentage (e.g. zero) by using that value for both the min and max values. The scale lines are sorted by min then max, and scanned from top to bottom. The first match wins.</p> 
</div>
<div class="examples">
<h3>Examples</h3>
<div class="example">
<h5>Setting up a (very simple) colour scale. Colours run smoothly from green to red.</h5>
<pre>SCALE 0 100   0 255 0   255 0 0</pre>
</div>
<div class="example">
<h5>The default scale set</h5>
<pre>SCALE   1   10    140     0  255
SCALE  10   25     32    32  255
SCALE  25   40      0   192  255
SCALE  40   55      0   240    0
SCALE  55   70    240   240    0
SCALE  70   85    255   192    0
SCALE  85  100    255     0    0</pre>
</div>
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Added named scales.</dd>
<dt>0.9</dt>
<dd>Added considtently sorted scales.</dd>
<dt>0.8</dt>
<dd>Added interpolated scale colours.</dd>
<dt>0.5</dt>
<dd>Changed to allow min and max to be fractional.</dd>
</dl>
</div>
</div>
      <div class="referenceentry">
<h2><a name="GLOBAL_KEYPOS">KEYPOS</a></h2>
<div class="definition">KEYPOS <em class="meta">x-pos</em> <em class="meta">y-pos</em>
</div>
<div class="definition">KEYPOS <em class="meta">x-pos</em> <em class="meta">y-pos</em> <em class="meta">headingstring</em>
</div>
<div class="definition">KEYPOS <em class="meta">scalename</em> <em class="meta">x-pos</em> <em class="meta">y-pos</em>
</div>
<div class="definition">KEYPOS <em class="meta">scalename</em> <em class="meta">x-pos</em> <em class="meta">y-pos</em> <em class="meta">headingstring</em>
</div>
<div class="description">
<p>Specifies the position of the key, or legend, that shows what each colour-range in a scale means. If a scalename is not given, 
 then "DEFAULT" is assumed. 
 If no KEYPOS line is given for a scale, then no legend is drawn - handy if you have many many colour ranges.</p><p>You can optionally specify an additional parameter, to change the heading above the colours in 
 the key. This can be used to change the language of the map, for example. If a scalename is given, then you <em>must also specify a title</em> - there is no useful default title for non-DEFAULT scales.</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Added support for multiple SCALEs.</dd>
<dt>0.6</dt>
<dd>Added ability to change text.</dd>
</dl>
</div>
</div>
      <div class="referenceentry">
<h2><a name="GLOBAL_KEYSTYLE">KEYSTYLE</a></h2>
<div class="definition">KEYSTYLE <em class="meta">stylename</em>
</div>
<div class="definition">KEYSTYLE <em class="meta">stylename</em> <em class="meta">size</em>
</div>
<div class="definition">KEYSTYLE <em class="meta">scalename</em> <em class="meta">stylename</em>
</div>
<div class="definition">KEYSTYLE <em class="meta">scalename</em> <em class="meta">stylename</em> <em class="meta">size</em>
</div>
<div class="description">
<p>Specifies the style of the key, or legend, that shows what each colour-range means. If a scalename is not given, 
 then "DEFAULT" is assumed. Valid stylenames are: 'classic', 'horizontal' and 'vertical'.</p><p>Classic has a line for each <a href="#GLOBAL_SCALE">SCALE</a> range defined. 'vertical' and 'horizontal' are fixed-size, showing a 
 continuous block from 0-100% usage, which is much more useful when gradient SCALEs are used, or when you have 
 a large number of <a href="#GLOBAL_SCALE">SCALE</a> lines in one scale.</p><p> 
 For 'horizontal' and 'vertical' styles, you can optionally add an additional parameter, which specifies the longer dimension of the legend in pixels. That is, for a horizontal legend, it specifies the width. The other dimension is calculated from the size of the font used (see KEYFONT). 
 </p><p><img src="../images/keystyle-classic.png"></img>Classic Style</p><p><img src="../images/keystyle-horizontal.png"></img>Horizontal Style</p><p><img src="../images/keystyle-vertical.png"></img>Vertical Style</p> 
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Added support for multiple key styles.</dd>
</dl>
</div>
</div>
      <div class="referenceentry">
<h2><a name="GLOBAL_SET">SET</a></h2>
<div class="definition">SET <em class="meta">hintname</em> <em class="meta">hintvalue</em>
</div>
<div class="description">
<p>Specifies a value for a <em>hint variable</em>.</p><p>Hint Variables allow the user to pass settings to the internals of Weathermap that 
 wouldn't normally need to be changed, or that aren't part of the core Weathermap application. 
 Examples are: small rendering changes, parameters for datasources plugins and similar.</p><p>Hint Variables are either Global for the map, or assigned to a specific link or node.</p><p>There is more about Hint Variables in the <a href="advanced.html">Advanced Topics</a> section.</p> 
</div>
<div class="examples">
<h3>Examples</h3>
<div class="example">
<h5>Enabling 'bulging link mode' in the link-rendering code.</h5>
<pre>SET link_bulge 1</pre>
</div>
</div>
<div class="changes">
<h3>Change History</h3>
<dl>
<dt>0.9</dt>
<dd>Originally added SET.</dd>
</dl>
</div>
</div>
    
    
</div></body>
</html>

Powered by WebSVN 2.2.1