Documentation
Downloading WeatherMap4RRD
You may download the latest version of WeatherMap4RRD directly from the download area.
You will have to choose between a perl and a php version. Until now, both versions have the same functionnalities.
Installing WeatherMap4RRD
Perl version
First of all, WeatherMap4RRD requires that you previously installed :
- Perl
- libgd (GD version >=2.0.12 is needed for some features like dot arrow or antialias)
- rrdtool
You will have an archive called weathermap4rrd-version.tgz (where version is the release version of weathermap4rrd).
To install program, you have to untar the archive somewhere in your machine (for example : /usr/local/weathermap4rrd). To do so, type :
$ cd /path_where_you_want_to_install $ tar xvzf weathermap4rrd-version.tgz
You will have the following files :
weathermap4rrd-version/CHANGELOG
weathermap4rrd-version/INSTALL
weathermap4rrd-version/LICENSE
weathermap4rrd-version/README
weathermap4rrd-version/weathermap -- main program
weathermap4rrd-version/icons -- icons directory
weathermap4rrd-version/weathermap.conf.example -- example of configuration file
PHP version
First of all, WeatherMap4RRD requires that you previously installed :
- PHP with GD support (with PNG support)
- rrdtool
You will have an archive called weathermap4rrd-php-version.tgz (where version is the release version of weathermap4rrd).
To install program, you have to untar the archive somewhere in your webserver docroot (for example : /var/www/weathermap4rrd). To do so, type :
$ cd /path_to_docroot $ tar xvzf weathermap4rrd-php-version.tgz
You will have the following files :
weathermap4rrd-php-version/CHANGELOG
weathermap4rrd-php-version/INSTALL
weathermap4rrd-php-version/LICENSE
weathermap4rrd-php-version/README
weathermap4rrd-php-version/weathermap -- main program
weathermap4rrd-php-version/icons -- icons directory
weathermap4rrd-php-version/weathermap.conf.example -- example of configuration file
weathermap4rrd-php-version/index.php - PHP script that will read RRDTool data and generated graph
weathermap4rrd-php-version/graphic.php - PHP script that is used by index.php for graphic elements
weathermap4rrd-php-version/rrd.php - PHP script that is used by index.php for read RRD values (I use Cacti original php scripts)
weathermap4rrd-php-version/config_tool.php - PHP script that is used by index.php for managing configuration file parameters
weathermap4rrd-php-version/config.php - PHP script that define default parameters
weathermap4rrd-php-version/icons - directory with a few example of icons that may be used with NODE directive.
Configuring WeatherMap4RRD
It is now time to configure weathermap.conf file (an example is available in archive : weathermap.conf.example).
First, duplicate the example file, type :
$ cp weathermap.conf.example weathermap.conf
Second step, you will need to create your own weathermap.conf configuration file. To do so, edit weathermap.conf with your favorite editor. For example, with vi editor, type ::
$ vi weathermap.conf
You will have to set at least NODEs and LINKs. For details of directives available, please consult Directives WeatherMap4RRD page.
Important :
If you use PHP version, you may edit config.php file to set up "rrdtool" and "weathermap4php" variables.
rrdtool should be set up to path where RRDTool is installed.
weathermap4php should be set up to path where you deploy the weathermap4rrd php archive.
Running WeatherMap4RRD
Perl version
To run weathermap, you just need to type :
$ cd weathermap4rrd-version
$ ./weathermap
By default, a PNG picture called weathermap.png will be generated in current directory. (see OUTPUTFILE directive to modify destination)
You can scheduled weathermap4RRD execution with creating an entry in your crontab. To do that, type :
$ crontab -e
Add the line :
*/5 * * * * /path/to/weathermap > /dev/null 2>&1
An example of configuration file can be found here.
PHP version
To run weathermap, you have to call index.php script like :
http://127.0.0.1/weathermap4rrd-php-1.2/index.php
Of course, you have to replace the path show besides with the path were you deployed weathermap4rrd.
An example of configuration file can be found here.
|