Weathermap5rrd is fork of Alexandre Fontelle's Weathermap4rrd which is weathermap PNG picture generator. Picture represents logical structure of network.

Code was re-written into PHP5 to meet today's needs as PHP4 is falling behind. Some bugs in the code got fixed and different architectural SW pattern was used (MVC-like). Also "rendering" of map got changed and layer-access is used now. Config file got changed as well and XML is used to represent data.

Weathermap5rrd comes with editor which makes map creation easier in some ways.

If you are an Weathermap4rrd user, please see directives as some of them might got changed, removed or are not supported yet. Also there are some new directives.


Weathermap5rrd is distributed under GNU/GPL v2.0



  • GDlib 2.0.x with PNG support (v2.0.18 is recommended)
  • RRDtools
  • PHP5 configure options: --with-gd --with-xsl --enable-xml



Please, use download page at



  • unpack archive and copy files to your website or desired directory (depends on the use).
  • don't forget to check write permissions for files like weathermap.xml, positioning.js, if you are about to use editor.
  • don't forget to make sure weathermap5rrd has permissions to write PNG image and HTML output file.
  • edit config.php and change default values to match your system.
  • for map out - http://yoursite/directory/index.php
  • for editor - http://yoursite/directory/index.php?module=editor



  1. group filter
  2. solve all "fixme" and "todo" comments in code
  3. how-to static image and html
  4. more documentation
  5. rewrite modules/drawmap.php as i hate it already



Some ideas for future work and improvement.

  1. snippets such as "yellow papers" with commentary inside
  2. show historical traffic ie. t_0 - 2 hours
  3. display only "%" instead of "% & values"
  4. add support for Cairo


Bugs n' patches

I'm almost sure you're going to find some bugs. They're always well hidden under rocks and discovered only by (mis)use. I try to test every release as much as possible (well, of course I do!), but I do miss things sometimes. If you find a bug, please, let me know. I have no preferred way, but looks like a good place to start as it's public and somebody else can be warned about the glitch in the code. However ie. if you make up your mind you want to call me or send an e-mail, then go ahead and do it! :)

Regarding to patches, always welcome. But please, send me diffs or complete patches only. You're going to save me a lot of time. Patch description is also good idea as I won't spend hours by figuring you've changed color of something from red to purple :)

Thank you in advance.


Tweaks and FAQs

I hope this section is going to grow by usage of Weathermap5RRD and asked questions.

[FAQ] Scale versus Autoscale directives

These are concurrent settings, so they can't co-exist together. If autoscale and scale are found in config file together, scale gets over-ruled by autoscale. If scale nor autoscale are defined, default autoscale takes place.

[How-to] add more background images/node icons

It is just simple as copying image, you want to use, under background/ or nodeicons/. Images must be in PNG format. Other formats are unsupported.

[How-to] debug modules/drawmap.php

  • call drawmap module with parameter debug=1
  • you can omit network test with parameter nonettest=1
  • ie. http://localhost/index.php?module=drawmap&debug=1&nonettest=1

[How-to] turn-on debug info?

Edit lib/dlib.php and change: public $debug = 0; to 1.

[Tweak] "Static" image

Disadvantage of dynamic weathermap is .xml config gets parsed everytime weathermap is viewed which costs time and some memory. Also image is created, which means even more resources and time are being consumed.

Let's say you want weathermap to be accessible via http://www.domain.tld/weathermap5rrd/, and your website resides in /var/www/htdocs/. So you'll create /var/www/htdocs/weathermap5rrd/. However you have to generate image somewhere; somewhere means where nobody can go from outer world - /var/www/weathermap5rrd-private/.

  • edit modules/index.php and change value 'private $staticout = 0;' to 1 in /var/www/weathermap5rrd-private/
  • edit modules/drawmap.php and change value 'private $imgtostdout = 0;' to 1 in /var/www/weathermap5rrd-private/
  • define outputfile in your .xml config file
  • copy index.php in /var/www/weathermap5rrd-private/ to ie. drawmap-sh.php
  • edit drawmap-sh.php and add line:
$_GET['module'] = "drawmap";
/* original code from index.php follows */
  • create shell script ie. like this:
php /var/www/weathermap5rrd-private/drawmap-sh.php;
  • call this script via crontab every time you want to refresh map
*/5 * * * root /var/www/weathermap5rrd-private/;
  • don't forget to set RRD offset in config.php
  • copy following files to web dir:
cd /var/www/weathermap5rrd-private/;
cp ./css/* \
./config.php \
./currentvalues.php \
./graph.php \
./index.php \
./lib/* \
./modules/index.php \
./modules/linkgraph.php \
./overlib/* \
./xsl/* \
./*.xml \

And that should be all.

[Tweak] Absolute path

This is not mandatory, but it's more like tune-up. It should help to speed up things a little bit and decrease overhead caused by relative paths. This means - speed and less memory/resources cost.

  • edit config.php and modify PATH to the full path to index.php.


Other weathermaps.

Required software.

design and web by Zdenek Styblik