tar xvzf nagvis-1.8.x.tar.gz
Place the NagVis directory tree somewhere on your system. For most cases
/usr/local/nagvis
is the best place.
mv nagvis /usr/local/nagvis
You should see the following directory listing:
# ls -l /usr/local/nagvis etc LICENCE README share varDON'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)
cd /usr/local/nagvisAn 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.phpNow you can edit this file with your favourite text editor - I use vi:
vi etc/nagvis.ini.phpMost lines in the freshly copied
nagvis.ini.php
are commented out (starting with a semicolon).
If you want to set different settings, you can simply uncomment the line and change its value.Since NagVis 1.5 it is necessary to configure the webserver to be able to use NagVis.
You will find a sample configuration file in etc/apache2-nagvis.conf-sample
.
Simply copy the file to the conf.d
directory of your webserver. For example this is /etc/apache2/conf.d
.
cp etc/apache2-nagvis.conf-sample /etc/apache2/conf.d/apache2-nagvis.conf
Now you need to open that file and edit it to fit your needs. It is important
to replace the macros @NAGVIS_WEB@
and @NAGVIS_PATH@
.
In this example you need to replace @NAGVIS_WEB@
with /nagvis
and @NAGVIS_PATH@
with /usr/local/nagvis/share
.
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 iswwwrun
). If you don't know which user the webserver is running then have a look at the webserver configuration. In case of Apache you can do this by the following command:grep -e 'USER' /etc/apache2/envvarsSuSE/RedHat/Debian (SLES, OpenSuSE, Fedora)
grep -e '^User' /etc/apache2/*.confIf your configuration file is located at another path you should correct this in the command above.
chown wwwrun:www /usr/local/nagvis -R chmod 664 /usr/local/nagvis/etc/nagvis.ini.php chmod 775 /usr/local/nagvis/etc/maps chmod 664 /usr/local/nagvis/etc/maps/* chmod 775 /usr/local/nagvis/etc/geomap chmod 664 /usr/local/nagvis/etc/geomap/* chmod 775 /usr/local/nagvis/share/userfiles/images/maps chmod 664 /usr/local/nagvis/share/userfiles/images/maps/* chmod 775 /usr/local/nagvis/var chmod 664 /usr/local/nagvis/var/* chmod 775 /usr/local/nagvis/var/tmpl/cache chmod 664 /usr/local/nagvis/var/tmpl/cache/*It's possible to set more restrictive permissions on the files but for most setups the example should be fine. Only change them if you know what you are doing!
There are two ways configuring NagVis. The first one is the web based configuration using the NagVis frontend (http://<nagiosserver>/<path-to-NagVis>/
). Take a look
at the header menu for options. To modify existing map objects you need to unlock the object you like to edit.
The second way is to edit the configuration files directly using a text editor of your choice. The map config files are located at etc/maps/
.
For valid formats and values have a look at Map Config Format Description.
http://<nagiosserver>/<path-to-nagvis>/frontend/nagvis-js/?mod=Map&show=<mapname>(i.e. http://localhost/nagvis/frontend/nagvis-js/?mod=Map&show=europe).
Have fun and please report bugs!