Installation

Cacti plugin

Requirements

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!

You will need the 'pcre' and 'gd' PHP modules in your command-line PHP. The poller-process runs using the command-line PHP which is not always the same as the server-side one. In some situations it is possible to have two completely different PHP installations serving these two - if you install from a package, then re-install from source, but to a different directory, for example. The poller process should warn you if the part it needs is not present.

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 in most versions (this has changed in 5.2.x). This is controlled by the 'memory_limit =' line in php.ini. You may need to increase this to 32MB or even more if you have problems. In fact, the current Cacti manual suggests 128MB. These problems will typically show up as the poller process just dying with no warning or error message, as PHP kills the script.

Installation

To use the Cacti plugin, you must unpack the zip file into a directory called '<cacti_root>/plugins/weathermap'. The zip contains a folder called 'weathermap' already, so unzipping it in the plugins folder should do the job.

You can then use the pre-install checker to see if your PHP environment has everything it needs. To do this, you need to run a special check.php script, twice...

First, go to http://yourcactiserver/plugins/weathermap/check.php to see if your webserver PHP (mod_php, ISAPI etc) is OK. Then, from a command-prompt run php check.php to see if your command-line PHP is OK. If any modules or functions are missing, you will get a warning, and an explanation of what will be affected (not all of the things that are checked are deadly problems).

File Permissions

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

Getting Started

Log in to the Cacti application, and go to the Plugin Management page. You should see the Weathermap plugin as an uninstalled plugin. Click the 'install' icon next to its name, and then click the 'enable' icon that appears next to that. If you are logged in as the 'admin' user, you should see the 'Weathermap' tab appear at the top of the Cacti page.

That's it! The Weathermap plugin is installed.

To allow other users to see it, you need to go to the User Management page in Cacti, and grant those users the extra permissions that should appear there now, to either View Weathermaps (for customers) and/or Manage Weathermaps (for admin users).

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.