Installation instructions

This instructions are meant for a new installation. If you update your old NagVis installation we strongly recommend to make a backup of your NagVis Directory and merge the config files manually.

STEP 0: Prepare System

Make sure your System fits the System requirements.

STEP 1: Download NagVis

Get NagVis, the latest release can be found at www.nagvis.org.

STEP 2: Unpack NagVis

tar xvzf nagvis-1.3.x.tar.gz

STEP 3: Move the unpacked NagVis directory

Place the NagVis directory tree into your Nagios share Folder. With standard Nagios path this is /usr/local/nagios/share.
mv nagvis /usr/local/nagios/share
You should see the directories etc, nagvis and wui
ls -l /usr/local/nagios/share/nagvis
DON'T move any files or folders inside the NagVis directory (in fact you can move, but in this case you have to change/add some parameters and values in the main config file - if everything is left untouched it should run "out of the box" without changes in the configuration files)

STEP 4: Configure NagVis

Move to new NagVis directory
cd /usr/local/nagios/share/nagvis
An example main configuration file can be found in etc/nagvis.ini.php-sample. If you like to change some settings, copy this example to etc/nagvis.ini.php.
cp etc/nagvis.ini.php-sample etc/nagvis.ini.php
Now you can edit this file with your favourite text editor - I use vi:
vi etc/nagvis.ini.php
Most lines in the fresh copied nagvis.ini.php are commented out. If you want to set different settings, you can simply uncomment the line and change its value. For information about the possible values have a look at Main Config Format Description.

STEP 5: Permissions

This is very important for a neatly working installation. First check which unix user account is used to run your webserver (in my case it is wwwrun). If you don't know which user the webserver is running on have a look at the webservers configuration. In case of apache you can do this by the following command:

Ubuntu
grep -e 'USER' /etc/apache2/envvars
SuSE/RedHat/Debian
grep -e '^User' /etc/apache2/*.conf
If your configuration file is located in another path you should correct this in the command above. Set the permissions to your NagVis directory (in my case the paths are like this):
		chown wwwrun:www /usr/local/nagios/share/nagvis -R
		chmod 664 /usr/local/nagios/share/nagvis/etc/nagvis.ini.php
		chmod 775 /usr/local/nagios/share/nagvis/nagvis/images/maps
		chmod 664 /usr/local/nagios/share/nagvis/nagvis/images/maps/*
		chmod 775 /usr/local/nagios/share/nagvis/etc/maps
		chmod 664 /usr/local/nagios/share/nagvis/etc/maps/*
		chmod 775 /usr/local/nagios/share/nagvis/var
		chmod 664 /usr/local/nagios/share/nagvis/var/*
It's possible to set even lower permissions on the files but for most setups the example should be fine. Only change them if you know what you are doing!

STEP 6: The graphical config tool (WUI)

NagVis has an included web based config tool called WUI. If you want to use it use your browser to open the page:
http://<nagiosserver>/<path-to-nagvis>/config.php
Hint: If you have some script or popup blockers, disable them for the WUI. When you see the NagVis image, right click on it, then a context menu should open and now you can configure NagVis and create maps with the WUI.

The Config Tools DOES NOT display the current Nagios States of Objects configured. Its only for configuring! To "use" your configured Maps afterwards see STEP 7!

If this doesn't work for you, or if you don't want to use the WUI, you can simply edit the map config files in the etc/maps/ directory with your favourite text editor. For valid format and values have a look at Map Config Format Description.

STEP 7: Watch the maps

You should now be able to watch your defined maps in your browser:
 http://<nagiosserver>/<path-to-nagvis>/index.php?map=<mapname>
Have fun and please report bugs!