NAME

config - PICNET 1.1 configuration reference


OVERVIEW

PicNet needs a reference PNG image (actually 1 per map) and a configuration file (check the picnet manpage)...

This document describes all the configuration options understood by the picnet software.


SYNTAX

PicNet configuration file looks like MRTG one. So it is very easy if you are familiar to mrtg.cfg...

If you used automatic generation of your MRTG config file, you should have a look at this file to get the name of targets. Then, you can edit the PicNet config file example (ex.cfg) to meet your needs.

ex.cfg

PicNet configuration file syntax follows some simple rules :


MAPS NAMING

Note than you can use PicNet with one map or with several maps (tree hierarchies are possible with MapColorIdx). For using several maps, you must specify the name of each map as a prefix to its parameters ('*' is the separator).

All the parameters (even global parameters if used with a prefix) can apply to one specified map.

Example :

 net1*ImageRef: ex.png

The default map (no '*' prefix) is named indexmap.

All the non-global parameters without prefix apply to this default map (indexmap). Global parameters without prefix obviously apply to all the maps defined.


GLOBAL PARAMETERS

Workdir

Workdir specifies where the logfiles and reference image are and where the resulting image and webpage should be created.

Example:

 WorkDir: /www/html/mrtg

Note that you can specify a WorkDir per map.

Refresh

How many seconds apart should the browser (Netscape, IE) be instructed to reload the page? If this is not defined, the default is 300 seconds (5 minutes).

Example:

 Refresh: 600

Note that you can specify a Refresh per map.


PER MAP CONFIGURATION

ImageRef

The name of the reference image. To create such a file, read the instructions in the picnet manpage.

This parameter is mandatory. You must not use the map name as the ImageRef name if you use the default ImageNet name : your reference image will be replaced !

Examples:

 ImageRef: mynet.png
 net1*ImageRef: imref1.png

ImageNet

The name of the image resulting of the PicNet process.

This parameter is optional. If not specified, the name of this image is the name of the map followed by '.png'.

Examples:

 ImageNet: traffic.png
 mynet*ImageNet: imnet2.png

HtmlTitle

This is the title of the HTML page displaying the processed image.

You must specify HtmlTitle or HtmlPageHeader in order to generate the HTML page for a map.

The name of an HTML page for a map is the name of this map followed by '.html'.

Example:

 HtmlTitle: Current traffic on my network (indexmap.html)
 net3*HtmlTitle: Current traffic on a distant network

HtmlPageHeader

This is the first HTML code line in the HTML page. Sorry, the header is limited to the line and about 100 characters.

You must specify Htmltitle or HtmlPageHeader in order to generate the HTML page for a map.

Examples:

 HtmlPageHeader: <H2 ALIGN=CENTER>Our Company Network<BR>Current Traffic</H2>
 Net1*HtmlPageHeader: <H2 ALIGN=CENTER>NET1 Current Traffic</H2>

HtmlAreasDef

So, you can specify a file with definitions of other clickable areas on your network image. These areas are defined using the HTML AREA tag. The file must be in the WorkDir directory.

HtmlAreasDef is useful only if you specify HtmlTitle or HtmlPageHeader in order to generate the HTML page for the map.

Examples:

 HtmlAreasDef: other.areas
 net*HtmlAreasDef: webmin.areas

And the content of other.areas is :

 <area href="info.html" alt="info" shape="poly" coords="126,76,234,75,250,74,248,80,129,84">
 <area href="mypage.html" alt="mypage" shape="rect" coords="110,66,126,97">
 ...


PER MAP AND TARGET CONFIGURATION

ColorIdx

ColorIdx is the color index value of the graphical object (line...) which color will change depending on values in the corresponding mrtg log file (traffic present on a link).

The new color depends on the maximum of the 2 values extracted from the mrtg log file (incoming and outgoing traffic for a router interface). Nowadays, there are 10 different colors (0-10 %, 10-20%, ...) but they can be modified before compiling in cfg.h and def.h.

Examples:

 ColorIdx[ezwf]: 250
 net2*ColorIdx[r1.1]: 245

ColorIdxIn

ColorIdxIn is the color index value of the graphical object (line...) which color will change depending on the first value in the corresponding mrtg log file (incoming traffic on a link).

Examples:

 ColorIdxIn[ezwf]: 251
 net2*ColorIdxIn[r1.1]: 246

ColorIdxOut

ColorIdxOut is the color index value of the graphical object (line...) which color will change depending on the second value in the corresponding mrtg log file (outgoing traffic on a link).

Examples:

 ColorIdxOut[ezwf]: 252
 net2*ColorIdxOut[r1.1]: 247

MaxRate

MaxRate is the maximum possible value processed from the corresponding MRTG log file. Actually, it is the maximum of the two values.

It is essential for computing the percentage which final color of ColorIdx depends on. Nowadays, there are 10 different colors (0-10 %, 10-20%, ...) but they can be modified before compiling in cfg.h and def.h.

For a router interface, it is the maximum traffic rate on the link. By default, the value is in bytes per second. But you can specify it in bits per second by adding ``bps'' after the value.

Examples:

 MaxRate[ezwf]: 64000 bps
 net1*MaxRate[r1.1]: 128000 bps

MaxRateIn

MaxRateIn is the maximum possible value processed from the corresponding MRTG log file. Actually, it is the maximum of the first value.

It is essential for computing the percentage which final color of ColorIdxIn depends on.

For a router interface, it is the maximum incoming traffic rate on the link. By default, the value is in bytes per second. But you can specify it in bits per second by adding ``bps'' after the value.

Examples:

 MaxRateIn[ezwf]: 128000 bps
 net1*MaxRateIn[temp]: 80

MaxRateOut

MaxRateOut is the maximum possible value processed from the corresponding MRTG log file. Actually, it is the maximum of the second value.

It is essential for computing the percentage which final color of ColorIdxOut depends on.

For a router interface, it is the maximum outgoing traffic rate on the link. By default, the value is in bytes per second. But you can specify it in bits per second by adding ``bps'' after the value.

Examples:

 MaxRateOut[ezwf]: 8000
 net2*MaxRateOut[r1.1]: 64000 bps

Rounds

With Rounds, you specify the number of MRTG intervals you want PicNet to average values on.

Examples:

Here, if MRTG is executed every 5 minutes for ezwf, you will display the average traffic on the last hour.

 Rounds[ezwf]: 12
 net2*Rounds[r1.1]: 12

MapRect

With MapRect, you can define a clickable rectangle on the image of your network to access an HTML MRTG stats page or a PicNet submap (see the next chapter).

You must specify the X1,Y1,X2,Y2 where (X1,Y1) is the upper left corner of the clickable rectangle and (X2,Y2) is the lower right corner.

For an object, you can define many MapRects (no limit other than memory). But these instructions will apply only if you specify HtmlTitle or HtmlPageHeader so that the HTML page will be created.

Note that the linked HTML pages must be in the same directory as the PicNet map HTML page.

Example:

In this example, when you click into the rectangle defined by the corners (126,76) and (234,85) on the image, you will access the MRTG stats page for ezwf.

 MapRect[ezwf]: 126,76,234,85

MapPoly

With MapPoly, you can define a clickable polygon on the image of your network to access an HTML MRTG stats page or a PicNet submap (see the next chapter).

You must specify the X1,Y1,X2,Y2,X3,Y3,...Xi,Yi where (Xi,Yi) are points of the polygon.

Please, refer to the MapRect comments above.

Example:

In this example, when you click into the polygon defined by the points (126,76), (234,85), (220,87) and (120,77) on the image, you will access the MRTG stats page for ezwf.

 net1*MapPoly[ezwf]: 126,76,234,85,220,87,120,77


LINKS BETWEEN MAPS

MapColorIdx

MapColorIdx is the color index value of the specified submap which color will change depending on the maximum color value of all the objects included in this submap. Obviously, the objects included in the submap can be MRTG targets or other submaps. So, you can define a tree hierarchy (as large as you want).

Take care not to create loops which is non-sense ! PicNet does not check it.

Examples:

 MapColorIdx[net2]: 250
 net2*MapColorIdx[net3]: 235
 net3*ColorIdx[ezwf]: 240

MapRect

With MapRect, you can define a clickable rectangle on the image of your network to access another PicNet map (or an HTML MRTG stats page).

Please, refer to the description of MapRect above.

You can create all the links you want between maps provided the HTML pages are in the same directory... There is no loop problem.

Example:

In this example, when you click into the rectangle defined by the corners (126,76) and (234,85) on the image of net1, you will access the map net2 and the reverse.

 net1*MapRect[net2]: 126,76,234,85
 net2*MapRect[net1]: 126,76,234,85

MapPoly

With MapPoly, you can define a clickable polygon on the image of your network to access an other PicNet map (or an HTML MRTG stats page).

Please, refer to the description of MapPoly above.

You can create all the links you want between maps provided the HTML pages are in the same directory... There is no loop problem.

Example:

In this example, when you click into the polygon defined by the points (126,76), (234,85), (220,87) and (120,77) on the image, you will access the map net1.

 MapPoly[net1]: 126,76,234,85,220,87,120,77


AUTHOR

Laurent Derrien, <derrien@canl.nc>

9.9.99 (last update 10.24.00)