Since most of the integration features are optional, there are a number of ways to install Weathermap.

  1. Standalone - the traditional way
  2. Standalone, with editor - the option of some integration with your monitoring system
  3. Cacti plugin - integrated into your Cacti installation

Installing Standalone

Unpack the zip file into a directory somewhere. If you intend to just use the 'traditional' hand-written text configuration files, then it can be anywhere on the same server that runs your data-collection software (MRTG, Cricket, Cacti).

You'll need to edit two lines in the weathermap file:

That should be it! You should be able to run

./weathermap
or
php weathermap (on Windows)

from a shell or command prompt, and get a (rather boring) weathermap.png file in return. If you don't, you should get some kind of error to help you figure out why.

Installing as a Cacti Plugin

Before doing anything else, please verify that your Plugin Architecture is working properly with a simpler plugin, like Links or Tools. Weathermap is relatively complex, and fault-finding both your Cacti Plugin Architecture and Weathermap at the same time will make life harder for you!

To use the Cacti plugin, you must unpack the zip file into a directory called '<cacti_root>/plugins/weathermap'.

You will need to change the permissions on the output directory, so that the Cacti poller process can write to it. This is the same as you would have done for the rra directory while installing Cacti itself originally. For a *nix system, it will be something like:

        chown cactiuser output

Then, edit your cacti config.php file and add a line:

        $plugins = array();
        $plugins[] = 'monitor';
        $plugins[] = 'weathermap';

Now, refresh your Cacti page, to be sure that everything is still working right. If not, remove the line you just added and you should return to normal. Make a note of any error message and let me know!

Assuming it all looks fine (but not very different), you can start to enable Weathermap. Log in as 'admin' or another user with User Management rights, go to the User Management section under Tools in the Cacti console, and then choose your own username from the list. Check the two new 'realms' boxes that should be there - View Weathermaps, and Manage Weathermaps - and then click Save. A 'Weathermap' tab should appear at the top of the page.

Before you start using it, you might want to change one PHP setting. Weathermap uses a fair bit of memory by PHP standards, as it builds the image for the map in memory before saving it. As a result, your PHP process may run out of memory. PHP has a 'safety valve' built-in, to stop runaway scripts from killing your server, which defaults to 8MB. This is controlled by the 'memory_limit =' line in php.ini. You may need to increase this to 16MB or 32MB if you have problems.

That's it! The Weathermap plugin is installed. To go further, you need some weathermap configuration files to define your maps. You can do this in two ways - using the Web-based map editor, or by editing the text-based configuration files directly.

To use the editor, you need to make a few more changes.

To learn more about actually using the Cacti plugin, see the Cacti Plugin page.

Configuring the Editor

If you are intending to use the browser-based editor, then the directory that you unpack the zip file into should be within the 'web space' on the web server that runs your data-collection application (that is, Cacti, MRTG, or similar).

Start by following the instructions above for either a Standalone or Cacti Plugin installation. You will be running weathermap just the same way, but once you have a working weathermap (or plugin), you need to continue below:

Copy the editor-config.php-dist file to /etc/cacti/weathermap-editor-config.php. If you use Cacti, and want to be able to pick data sources from your Cacti installation by name, edit the file and make sure that the line that sets $cacti_base is correct, and that the base URI below that is also correct for your Cacti installation (these two lines are marked CHANGE in the file).

Make sure that your webserver can write to the configs directory. To do this, you need to know which user your webserver runs as (maybe 'nobody', 'www' or 'httpd' on most *nixes) and then run:

chown www configs
        chmod u+w configs
In a pinch, you can just chmod 777 configs, but this isn't really a recommended solution for a production system.

On Windows, the same applies - the user that runs the webserver runs as should have permissions to write new files, and change existing files in the configs folder.

You should now be able to go to http://yourserver/wherever-you-unpacked-weathermap/editor.php (or http://yourserver/cacti/plugins/weathermap/editor.php) in a browser, and get a welcome page that offers to load or create a config file. That's it. All done. Please see the editor manual page for more about using the editor!

Important Security Note: The editor allows anyone who can access editor.php to change the configuration files for your network weathermaps. There is no authentication built-in for editing, even with the Cacti Plugin. This is why the configuration file doesn't exist by default - the editor won't work until you choose to make it work. It's recommended that you either:

It's anticipated that a future version of Weathermap will include better integration with Cacti authentication for users of the Cacti Plugin version of this editor.