This page is automatically compiled, and documents all the configuration directives that are available in PHP Weathermap v0.91 .
NODE POSITION LABEL TARGET USESCALE MAXVALUE ICON LABELOFFSET LABELFONT *COLOR INFOURL OVERLIBGRAPH OVERLIBWIDTH OVERLIBHEIGHT OVERLIBCAPTION NOTES SET
LINK NODES TARGET USESCALE WIDTH BANDWIDTH BWLABEL BWLABELPOS BWFONT INCOMMENT OUTCOMMENT COMMENTFONT *COLOR INFOURL OVERLIBGRAPH OVERLIBWIDTH OVERLIBHEIGHT OVERLIBCAPTION NOTES VIA ARROWSTYLE SET
BACKGROUND WIDTH HEIGHT HTMLOUTPUTFILE IMAGEOUTPUTFILE FONTDEFINE *FONT *COLOR TIMEPOS TITLE TITLEPOS KILO HTMLSTYLE SCALE KEYPOS KEYSTYLE SET
The initial definition of a NODE. This must come before any other configuration related to this node.
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.
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.
Specifies where to place the node on the map. Coordinates are in pixel units, with the origin at the top-left of the map.
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!
NODE main_node POSITION 200 320 LABEL MAIN NODE sub_node POSITION main_node 0 -20 LABEL {nodes:main_node:invalue}
Specifies a label for the node. Everything to the end of the line is used.
If the node has an ICON defined as well, then you can specify the position of the label relative to the node's centre-point by using LABELOFFSET.
The text for the label can contain special tokens to show map data.
This is drawn using the font specified by LABELFONT in the colours specified by LABELFONTCOLOR, LABELFONTSHADOWCOLOR, LABELBGCOLOR and LABELOUTLINECOLOR.
Specifies where to look for the current "throughput" information for this NODE. 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 subtracted from the final result instead.
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.
The actual contents of the targetspec depend on the data source plugins that are available. The standard plugins are documented here.
TARGET link1a.rrd link1b.rrd
TARGET poot.rrd:-:DS1 poot2.rrd:DS0:-
link1 3M 4M link2 66K 1.8M link3 34.6K 113
Specify which SCALE to use to decide the colour of this node.
After the percentage usage is calculated (using BANDWIDTH/MAXVALUE and data from the TARGET line), the colour is decided by looking up the percentage against this SCALE. If there is no USESCALE line, then the default scale is used.
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 TARGET line to fetch data that is used in the LABEL or ICON of the node, for example, without changing the colour of the node itself.
Specifies the maximum value(s) for the node, in the same way that BANDWIDTH does for a LINK. These are used to calculate the percentage usage value, which in turn is used to decide the NODE's colour, if it has a TARGET defined.
The default value is 100, which has the effect of not changing the input value ( (n/100)*100 = n ).
Specifies an icon to use for the node.
The filename can either be a full path to the image, or a relative one.
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.
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 NODE, and want to override that for a few special cases.
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.
The size of the icon image is used by LABELOFFSET to decided how far to move the label, if you use compass-point offsets.
The text for the filename can contain special tokens to select an icon based on map data.
If you specify an ICON, and also a LABEL, then you will find that the label is often hard to read. LABELOFFSET allows you to move the position of the LABEL, so that it's not directly over the centre of the node anymore.
You can specify a compass-point (e.g. LABELOFFSET S). The compass-point method takes the size of the ICON, 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.
For more control, you can specify an integer offset for the x and y positions of the label (e.g. LABELOFFSET -10 -20) instead.
Specify the font used for drawing the LABEL.
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 FONTDEFINE directive.
The built-in GD fonts.
Specify the colours used for drawing the LABEL.
red, green and blue are numbers from 0 to 255.
LABELFONTSHADOWCOLOR, LABELBGCOLOR and LABELOUTLINECOLOR have an additional option - 'none' - which stops that element of the LABEL being drawn. LABELFONTSHADOWCOLOR defaults to 'none'.
Creates a hyperlink in the HTML output.
If you are using the HTML output facility, then a link is added to the <map> section of the HTML so that when you click on the node, you are taken to the url specified here.
Creates a popup image in the HTML output.
If you are using the HTML output facility, and HTMLSTYLE is set to 'overlib', then a link is added to the <map> 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.
If a NOTES line is also specified for a node, then the image specified here appears with the NOTES text underneath it.
OVERLIBGRAPH http://www.yoursite.net/mrtg/router1-cpu-daily.png
Specify the width, in pixels of the graph image referred to by OVERLIBGRAPH line.
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 NODE. If you use this, you must also use OVERLIBHEIGHT, for either to have any effect.
Specify the width, in pixels of the graph image referred to by OVERLIBGRAPH line.
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 NODE. If you use this, you must also use OVERLIBWIDTH, for either to have any effect.
Specify the caption used for the popup HTML 'window' if you have also specified an OVERLIBGRAPH line. By default, this is the name of the NODE.
The text for the caption can contain special tokens to show map data.
Specifies the text or HTML notes for a node.
The notes text appears in a popup box when the user hovers their mouse over the node. If an OVERLIBGRAPH is specified too, then the text appears below the graph.
The map HTMLSTYLE must be set to 'overlib' to enable any of the mouse-hover functionality.
Specifies a value for a hint variable.
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.
Hint Variables are either Global for the map, or assigned to a specific link or node.
There is more about Hint Variables in the Advanced Topics section.
The first line of a LINK definition.
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 OVERLIBGRAPH without an OVERLIBCAPTION, however.
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.
These are the NODEs that this link joins. There can be only two. They are the 'nodename's from the NODE line for each node.
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.
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'.
LINK mylink NODES node1 node2
LINK firstlink NODES node1:E node2:E LINK secondlink NODES node1:W node2:W
LINK firstlink NODES node1:-10:10 node2:20:12
Specifies where to look for the current throughput information for this LINK. 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 subtracted from the final result instead.
The actual contents of the targetspec depend on the data source plugins that are available. The standard plugins are documented here.
TARGET link1a.rrd link1b.rrd
TARGET poot.rrd:-:DS1 poot2.rrd:DS0:-
link1 3M 4M link2 66K 1.8M link3 34.6K 113
Specify which SCALE to use to decide the colour of this link.
After the percentage usage is calculated (using BANDWIDTH and data from the TARGET line), the colour is decided by looking up the percentage against this SCALE. If there is no USESCALE line, then the default scale is used.
Specifies the maximum throughput of this link, in bits per second.
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.
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 NODES line.
Bandwidths can also use K,M,G and T suffixes to specify large values. Also see the KILO global option though.
BANDWIDTH 2M 256K
Specifies the type of 'bandwidth' label shown on each link.
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 TARGET and displays it without any formatting - this can be useful for mapping things other than bandwidth. 'none' hides the bandwidth label altogether.
Specifies the position of the 'bandwidth' labels shown on each link.
The two position values are percentages along the link arrow, from the first to the second node. Therefore BWLABELPOS 75 25 is the default.
Specify the font used for drawing the BWLABEL boxes.
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 FONTDEFINE directive.
The built-in GD fonts.
Specifies a comment for the input side of a LINK.
The link comment appears as text running alongside the link arrow. The font used is governed by COMMENTFONT and the colour by COMMENTFONTCOLOR.
The text for the comment can contain special tokens to show map data.
The COMMENTFONT must be a TrueType font as these are the only font type to support rotating text.
Specifies a comment for the output side of a LINK.
The link comment appears as text running alongside the link arrow. The font used is governed by COMMENTFONT and the colour by COMMENTFONTCOLOR.
The text for the comment can contain special tokens to show map data.
The COMMENTFONT must be a TrueType font as these are the only font type to support rotating text.
Specify the font used for drawing the INCOMMENT and OUTCOMMENT text.
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 FONTDEFINE directive.
For Link Comments, you must define a TrueType font. These are the only font that can rotate text through any angle, as required by comments.
Specify the colours used for drawing the link.
red, green and blue are numbers from 0 to 255.
OUTLINECOLOR, BWOUTLINECOLOR and BWBOXCOLOR have an additional option - 'none' - which stops that element of the link being drawn.
The colours are used as follows:
Creates a hyperlink in the HTML output.
If you are using the HTML output facility, then a link is added to the <map> section of the HTML so that when you click on the (weathermap) link, you are taken to the url specified here.
Creates a popup image in the HTML output.
If you are using the HTML output facility, and HTMLSTYLE is set to 'overlib', then a link is added to the <map> 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.
If a NOTES line is also specified for a link, then the image specified here appears with the NOTES text underneath it.
OVERLIBGRAPH http://www.yoursite.net/mrtg/router1-link2-daily.png
Specify the width, in pixels of the graph image referred to by OVERLIBGRAPH line.
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 OVERLIBHEIGHT, for either to have any effect.
Specify the width, in pixels of the graph image referred to by OVERLIBGRAPH line.
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 OVERLIBWIDTH, for either to have any effect.
Specify the caption used for the popup HTML 'window' if you have also specified an OVERLIBGRAPH line. By default, this is the name of the LINK.
The text for the caption can contain special tokens to show map data.
Specifies the text or HTML notes for a link.
The notes text appears in a popup box when the user hovers their mouse over the link. If an OVERLIBGRAPH is specified too, then the text appears below the graph.
The map HTMLSTYLE must be set to 'overlib' to enable any of the mouse-hover functionality.
Specify an additional point that a link must pass through.
A link normally goes in a straight line between the two nodes listed in the NODES 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.
If you specify multiple VIA lines, then the link will pass through each in turn, in the order they are specified.
Specifies the style of arrowhead used for drawing links.
The default is 'classic' which has a wide arrowhead. You can also choose 'compact' which gives narrower heads.
Finally, you can get finer control by adjusting the size yourself. The width and length of the head are in units of link-width.
Classic is equivalent to '4 2' and Compact is equivalent to '1 1'.
Specifies a value for a hint variable.
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.
Hint Variables are either Global for the map, or assigned to a specific link or node.
There is more about Hint Variables in the Advanced Topics section.
Specify an PNG, JPEG or GIF image file to be used as a background image.
Any WIDTH and HEIGHT specifications will be ignored - the map will take the size of the background.
Specifies the width of the map image in pixels.
If a BACKGROUND is specified, and the imagefile is successfully loaded, then any WIDTH specified is ignored. If neither a BACKGROUND or WIDTH is specified, then the default WIDTH is 800 pixels.
Specifies the height of the map image in pixels.
If a BACKGROUND is specified, and the imagefile is successfully loaded, then any HEIGHT specified is ignored. If neither a BACKGROUND or HEIGHT is specified, then the default HEIGHT is 600 pixels.
This specifies the name of the HTML file that will be generated.
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.
This specifies the name of the PNG, JPEG or GIF file that will be generated. The format chosen is based on the file-extension.
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. You can set the output format in the Cacti Settings page.
Defines a custom font to be used for text within the map.
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.
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.
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.
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:
Regardless of the format, the newly defined font can be used anywhere that you'd normally use a font number (for example, BWFONT or KEYFONT).
FONTDEFINE 10 VeraBd 16
Specify the fonts used for various text.
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 FONTDEFINE directive.
The built-in GD fonts.
Specify the colours used for drawing the global elements of the map.
red, green and blue are numbers from 0 to 255.
LABELFONTSHADOWCOLOR, LABELBGCOLOR and LABELOUTLINECOLOR have an additional option - 'none' - which stops that element of the LABEL being drawn. LABELFONTSHADOWCOLOR defaults to 'none'.
Specifies where to draw the timestamp on the map.
If no TIMEPOS line is given, then the timestamp is drawn in the top-right corner. To hide it completely, set y to be
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
Specifies the title text.
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 TITLEPOS line also.
Specifies the position of the title text.
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.
Specifies base value for kilo, mega and giga abbreviations.
Both BANDWIDTH and BWLABEL 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.
Specifies the HTML output style.
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.
Defines one 'span' within the link colour-coding table.
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.
If you specify two 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.
Without a scalename, the SCALE line will add a definition to the scale named 'DEFAULT'. If you define any other named scales, you can then use the USESCALE directive to specify that a particular NODE or LINK use your new scale.
If you don't add any 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.
You can specify a colour for an exact 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.
SCALE 0 100 0 255 0 255 0 0
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
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.
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 must also specify a title - there is no useful default title for non-DEFAULT scales.
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'.
Classic has a line for each SCALE 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 SCALE lines in one scale.
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).
Classic Style
Horizontal Style
Vertical Style
Specifies a value for a hint variable.
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.
Hint Variables are either Global for the map, or assigned to a specific link or node.
There is more about Hint Variables in the Advanced Topics section.
SET link_bulge 1