search by tags

for the user

adventures into the land of the command line

installing nagvis

nagvis is a visualisation addon for nagios. i think the idea is that you can view a dynamically generated diagram of your environments. but you have to configure the drawing rules yourself, using an x/y coordinate system. this post is just about installing nagvis, not configuring it

extract the Nagvis source code tarball to /usr/local/

$ tar -zxvf nagvis-1.7.10.tar.gz -C /usr/local/

move the nagios share directory

edit the main configuration file. the configuration options are described at http://docs.nagvis.org/1.8/en_US/nagvis_config_format_description.html

$ cp /usr/local/nagvis-1.7.10/etc/nagvis.ini.php-sample /usr/local/nagvis-1.7.10/etc/nagvis.ini.php
$ vim /usr/local/nagvis-1.7.10/etc/nagvis.ini.php
configure the webserver:
$ cp /usr/local/nagvis-1.7.10/etc/apache2-nagvis.conf-sample /etc/httpd/conf.d/apache2-nagvis.conf

replace all occurrences of

@[email protected] with /nagvis
@[email protected] with /usr/local/nagvis-1.7.10/share

check which unix user is used to run your webserver

$ grep -e '^User' /etc/httpd/conf/*.conf

assuming the user is ‘apache’, set file and directory permissions as below

$ mkdir -p /usr/local/nagvis-1.7.10/var/tmpl/cache
$ mkdir /usr/local/nagvis-1.7.10/var/tmpl/compile
$ chown -R apache:root /usr/local/nagvis-1.7.10
$ chmod 664 /usr/local/nagvis-1.7.10/etc/nagvis.ini.php
$ chmod 775 /usr/local/nagvis-1.7.10/etc/maps
$ chmod 664 /usr/local/nagvis-1.7.10/etc/maps/*
$ chmod 775 /usr/local/nagvis-1.7.10/etc/geomap
$ chmod 664 /usr/local/nagvis-1.7.10/etc/geomap/*
$ chmod 775 /usr/local/nagvis-1.7.10/share/userfiles/images/maps
$ chmod 664 /usr/local/nagvis-1.7.10/share/userfiles/images/maps/*
$ chmod 775 /usr/local/nagvis-1.7.10/var
$ chmod 664 /usr/local/nagvis-1.7.10/var/*
$ chmod 775 /usr/local/nagvis-1.7.10/var/tmpl
$ chmod 775 /usr/local/nagvis-1.7.10/var/tmpl/cache
$ chmod 664 /usr/local/nagvis-1.7.10/var/tmpl/cache/*
$ chmod 775 /usr/local/nagvis-1.7.10/var/tmpl/compile
$ chmod 664 /usr/local/nagvis-1.7.10/var/tmpl/compile/*
$ cp -r /usr/local/nagvis-1.7.10/docs /usr/local/nagvis-1.7.10/share

navigate to nagvis in a browser and log in with admin/admin, voila: http://mycomputersipaddress/nagvis/