Directives WeatherMap4RRD
WeatherMap4RRD's directives are listed below :
Global subdirectives
NODE subdirectives :
LINK subdirectives
BACKGROUND directive
Syntax : BACKGROUND file-path
Example : BACKGROUND /usr/local/weathermap4rrd/background.png
Include from version : 1.1.1
The BACKGROUND directive sets the name of a PNG picture that can be used for background of network map generated.
If no BACKGOUND directive is used, background of graph will be display white.
FONT directive
Syntax : FONT integer (integer must be set between 1 and 5)
Example : FONT 4
Include from version : 1.1.1h
The FONT directive sets the size of font that will be used to display links bandwidth values and nodes labels.
0 = gdTinyFont
1 =
gdSmallFont
2 =
gdMedium
3 =
BoldFont,
4 =
gdLargeFont
5 =
gdGiantFont
KEYPOS directive (deprecated)
Syntax : KEYPOS x-axis y-axis
Example : KEYPOS 600 15
Include from version : 1.1.1
The KEYPOS directive sets position of graph legend.
If no KEYPOS directive are specified, KEYPOS 0 0 will be default value.
Notice : KEYPOS shouldn't be use anymore. Use LEGENDPOS in place.
LEGENDPOS directive
Syntax : LEGENDPOS x-axis y-axis
Example : LEGENDPOS 600 15
Include from version : 1.2rc6
The LEGENDPOS directive sets position of graph legend.
If no LEGENDPOS directive are specified, LEGENDPOS 0 0 will be default value.
LEGENDPOS will in future definitvely replace KEYPOS directive
LEGENDSTYLE directive
Syntax : LEGENDSTYLE original || line
Example : LEGENDSTYLE line
Include from version : 1.2rc6
The LEGENDSTYLE directive defines type of legend that will be display. Choice is possible between "original" and "line"
Default value is "orignal".
HEIGHT directive
Syntax : HEIGHT integer
Example : HEIGHT 600 (default value)
Include from version : 1.1.1
The HEIGHT directive sets height value of graph that will be generate.
HTMLFILE directive
Syntax : HTMLFILE file-path
Example : HTMLFILE /var/www/weathermap4rrd/docroot/map.html
Include from version : 1.2rc6
The HTMLFILE directive sets the pathname of the HTML output file for HTML map (need for LINKOVERLIBGRAPH and LINKINFOURL directives
See also : LINKOVERLIBGRAPH, LINKINFOURL
WIDTH directive
Syntax : WIDTH integer
Example : WIDTH 740 (default value)
Include from version : 1.1.1
The HEIGHT directive sets height value of graph that will be generate.
TITLE directive
Syntax : TITLE "string"
Example : TITLE "Tropicalex Network Map"
Include from version : 1.1.1
The TITLE directive sets value of title display on graph.
There is no default value for this directive.
Warning : keep " characters to be able to use space characters in the title.
See also : TITLEPOS, TITLEBACKGROUND, TITLEFOREGROUND
TITLEPOS directive
Syntax : TITLEPOS x-axis y-axis
Example : TITLEPOS
Include from version : 1.1.1
The TITLEPOS directive sets position of title on graph.
See also : TITLE, TITLEBACKGROUND, TITLEFOREGROUND
TITLEBACKGROUND directive
Syntax : TITLEBACKGROUND red green blue
Example : TITLEBACKGROUND 255 255 255
Include from version : 1.2
The TITLEBACKGROUND directive sets RGB title background color (red, green,blue).
See also : TITLE, TITLEPOS, TITLEFOREGROUND
TITLEFOREGROUND directive
Syntax : TITLEFOREGROUND red green blue
Example : TITLEBACKGROUND 0 0 0
Include from version : 1.2
The TITLEFOREGROUND directive sets RGB title foreground color (red, green,blue).
See also : TITLE, TITLEPOS, TITLEBACKGROUND
OUTPUTFILE directive
Syntax : OUTPUTFILE file-path
Example : OUTPUTFILE /var/www/weathermap4rrd/docroot/weathermap.png
Include from version : 1.1.1
The OUTPUTFILE directive sets the pathname of the PNG output file in which network map is generate.
In php version, this parameter is optional. You may not used this parameter because call to index.php will display graph in your browser.
SCALE directive
Syntax : SCALE low_bound high_bound red green blue
Example : SCALE 10 25 32 32 255
Include from version : 1.1.1
The SCALE directive defines
RGB color (red, green,blue) used for a link utilization percentage includes in low_bound and high_bound.
For example, SCALE 10 25 32 32 255 means that a link utilization includes between 10 and 25% will be display with RGB color (32,32,255).
By default, you may use following definition :
# low high red green blue
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
AUTOSCALE directive
Syntax : AUTOSCALE number_of_divisions || number of division start_red start_green start_blue end_red end_green end_blue
Example : AUTOSCALE 15 24 232 2 0 0 0
Include from version : 1.2
The AUTOSCALE directive defines a dynamic RGB colors scale. You should define RGB colors start (start_red start_green start_blue) and end (end_red end_green end_blue).
If you specify only the number of divisions to use in scale, colors used with example SCALE directive will be used.
IPCHECK directive
Syntax : IPCHECK 1 || 0
Example : IPCHECK 1
Include from version : 1.2rc6
The IPCHECK directive indicates if CHECK directive (NODE section) will be treated.
This allow to create a test to display node name in red or in green. For example you may check that node is present with a ping test or tcp test on a specific port. See CHECK directive for details.
REFRESH directive
Syntax : REFRESH seconds
Example : REDRESH 60
Include from version : 1.2rc6
The REFRESH directive defines interval between refresh of map display. Default value is 60 seconds.
NODE directive
Syntax : NODE string
Example : NODE myrouter
Include from version : 1.1.1
The NODE directive defines beginning of a NODE section.
See also : POSITION, LABEL, ICON
POSITION subdirective
Syntax : POSITION x-axis y-axis
Example : POSITION 100 350
Include from version : 1.1.1
The POSITION directive sets position of NODE in graph. X-axis and y-axis are set in pixels.
LABEL subdirective
Syntax : LABEL string
Example : LABEL routername
Include from version : 1.1.1
The LABEL directive sets NODE string that will be display at NODE's POSITION
LABEL subdirective
Syntax : LABELTYPE round
Example : LABELTYPE round
Include from version : 1.2rc8
The LABELTYPE directive allow LABEL to be displayed in a round instead of a square.
ICON subdirective
Syntax : ICON file-path x-axis y-axis merge-value
Example : ICON icons/router.png 460 315 90
Include from version : 1.2
The ICON directive sets file-path of PNG file that will be used as icon for NODE
ICONPOS subdirective
Syntax : ICONPOS x-axis y-axis
Example : ICONPOS 460 315
Include from version : 1.2
The ICONPOS directive sets position of ICON in network map (x-axis and y-axis values). Default value is NODE position.
ICONTPT subdirective
Syntax : ICONTPT merge-value
Example : ICONTPT 90
Include from version : 1.2
The ICONTPT directive sets merge-value to indicate "transparency" of icon (in percent). Default value is 100.
ICONRESIZE subdirective
Syntax : ICONRESIZE size
Example : ICONRESIZE 100
Include from version : 1.2
The ICONTPT directive sets size to which icon will be resize (in percent). Default value is 100.
IP subdirective
Syntax : IP ip_address
Example : IP 192.168.20.4
Include from version : 1.2rc6
The IP directive defines ip address of node. This value is used with CHECK directive.
CHECK subdirective
Syntax : CHECK ping || [tcp port]
Example : CHECK tcp 80
Include from version : 1.2rc6
The CHECK directive creates a test for concerned node. If test is positive, background color of node display will be green. If test result is negative, background color of node will be displayed red. Use of tcp check is recommended rather than ping check because in case of failure, ping is very slow to send result.
See also : IPCHECK, IP directives
LINK directive
Syntax : LINK string
Example : LINK linkname
Include from version : 1.1.1
The LINK directive defines beginning of a LINK section.
See also : NODES, TARGET, INPOS, OUTPOS, UNIT, BANDWIDTH, DISPLAYVALUE, ARROW, GROUP
NODES subdirective
Syntax : NODES nodename nodename
Example : NODES myrouter myhost
Include from version : 1.1.1
The NODES directive defines node names belonging to this link.
TARGET subdirective
Syntax : TARGET file-path
Example : TARGET /home/monitoring/rrd/myrouter.rrd
Include from version : 1.1.1
The TARGET directive defines RRD database or MRTG file where node's network interface utilization are stored.
See also : INPOS, OUTPOS, UNIT, TARGETIN, TARGETOUT
TARGETIN subdirective
Syntax : TARGETIN file-path
Example : TARGETIN /home/monitoring/rrd/myrouter.rrd
Include from version : 1.2RC8
The TARGETIN directive defines RRD database file or MRTG file where node's network interface inboud utilization are stored.
See also : INPOS, OUTPOS, UNIT, TARGET, TARGETOUT
TARGETOUT subdirective
Syntax : TARGETOUT file-path
Example : TARGETOUT /home/monitoring/rrd/myrouter.rrd
Include from version : 1.2RC8
The TARGETOUT directive defines RRD database file or MRTG file where node's network interface outboud utilization are stored.
See also : INPOS, OUTPOS, UNIT, TARGETIN, TARGET
INPOS subdirective
Syntax : INPOS position
Example : INPOS 1
Include from version : 1.1.1
The INPOS directive sets the "position" entry of incoming netwok interface utilization in RRD database file define with TARGET directive.
See also : TARGET, OUTPOS, UNIT
OUTPOS subdirective
Syntax : OUTPOS position
Example : OUTPOS 1
Include from version : 1.1.1
The OUTPOS directive sets the "position" entry of outcoming netwok interface utilization in RRD database file define with TARGET directive.
See also : INPOS, TARGET, UNIT
UNIT subdirective
Syntax : UNIT unitvalue
Example : UNIT bytes
Include from version : 1.1.1
The UNIT directive sets the unit of RRD values stored in TARGET filename. You may choose a value from one of following :
- bytes
- Kbytes
- Mbytes
- bits
- Kbits
- Mbits
This value is important and will be used to define a coeficient used to calculate bandwidth capacity utilization.
See also : INPOS, TARGET
BANDWIDTH subdirective
Syntax : BANDWIDTH incoming-capacity [outcoming_capacity]
Example : BANDWIDTH 512
Include from version : 1.1.1
The BANDWIDTH subdirective sets input and output bandwidths of.the link. This value has to be set up in Kbits.
DISPLAYVALUE subdirective
Syntax : DISPLAYVALUE 0 || 1
Example : DISPLAYVALUE 1
Include from version : 1.1.1b
The DISPLAYVALUE lets you display bandwidth value on graph.
ARROW subdirective
Syntax : ARROW normal || ARROW circle || ARROW halfarrow
Example : ARROW circle
Include from version : 1.1.1g
The ARROW subdirective sets type of arrow that will be used to display link. You have choice between "normal", "circle" or "halfarrow" (for 1.2RC8) modes. Default display will use "normal" mode.
halfarrow style is avaible since 1.2RC8 release only.
GROUP subdirective
Syntax : GROUP string
Example : GROUP fiber
Include from version : 1.2 (only in perl version)
The GROUP subdirective associates a group to LINK. This group could be use to display graph with only links belonging to a specified group.
For example, if you want to display only links belonging to group called "fiber", you may run weathermap as follow :
weathermap --group=fiber
INTERNODE subdirective
Syntax : INTERNODE posx posy
Example : INTERNODE 300 370
Include from version : 1.2
The INTERNODE directive sets intermediate point position between nodes link. You may use as many INTERNODE as you wish in a link definition.
For example :
INTERNODE 300 370
INTERNODE 330 250
INTERNODE 250 230
INTERNODE 300 180
means that arrow will go thru node A to node B thru points (300,370), (330,250), (250,230) and (300,180).
INTERNODEDISPLAY subdirective
Syntax : INTERNODEDISPLAY merge-value
Example : INTERNODEDISPLAY 50
Include from version : 1.2RC3
The INTERNODEDISPLAY directive sets merge-value to indicate "transparency" of internodes (in percent). Default value is 0 and internodes are not displayed.
INTERNODEDISPLAYNUM subdirective
Syntax : INTERNODEDISPLAYNUM yes | no
Example : INTERNODEDISPLAYNUM yes
Include from version : 1.2RC8
The INTERNODEDISPLAYNUM directive defines if number of internodes will be displayed. Default is no.
INTERNODEDISPLAYMID subdirective
Syntax : INTERNODEDISPLAYMID yes | no
Example : INTERNODEDISPLAYMID yes
Include from version : 1.2RC8
The INTERNODEDISPLAYMID directive defines if middle internode will be displayed. Default is no.
LINKOVERLIBGRAPH subdirective
Syntax : LINKOVERLIBGRAPH
Example : LINKOVERLIBGRAPH
Include from version : 1.2rc6
The LINKOVERLIBGRAPH directive indicates that when mouse is over the link, graph of in and out bandwidth of the link will be displayed over the map. You need to set HTMLFILE directive to use LINKINFOURL.
See also : LINKINFOURL, HTMLFILE
LINKINFOURL subdirective
Syntax : LINKINFOURL globalgraph || custom
Example : LINKINFOURL globalgraph
Include from version : 1.2rc6
The LINKINFOURL directive defines HTML link's target if someone clicks on link on the map. You may use "globalgraph" to display bandwidth of link during last day, last week, last month and last year. You can create your own link with LINKINFOURL your_link. You need to set HTMLFILE directive to use LINKINFOURL.
See also : LINKOVERLIBGRAPH, HTMLFILE
To conclude, you may check an example of configuration file can be found here.
|