Saturday 6 August 2016

Nagvis Installation and configurations.

Step 1

Download the required linux package from http://www.nagvis.org/downloads. I have download the version of nagvis 1.8.5.

Step 2

move the package to required location i have put that in /opt and extract the package with below command.

tar -xvzf nagvis-1.8.5.tar.gz
cd nagvis-1.8.5

step 3

make sure all the required packages are all installed. Below i have mentioned the packages.

php-gd
php-mbstring
php-gettext
php-session
php-xml
php-pdo
apache mode_php

graphviz-2.30
graphviz dot
graphviz neato
graphviz twopi
graphviz circo
graphviz fdp
SQlite 3.7

Step 4

Install the package with very simple command

./install.sh

+------------------------------------------------------------------------------+
| Welcome to NagVis Installer 1.8.5                                            |
+------------------------------------------------------------------------------+
| This script is built to facilitate the NagVis installation and update        |
| procedure for you. The installer has been tested on the following systems:   |
| - Debian, since Etch (4.0)                                                   |
| - Ubuntu, since Hardy (8.04)                                                 |
| - SuSE Linux Enterprise Server 10 and 11                                     |
|                                                                              |
| Similar distributions to the ones mentioned above should work as well.       |
| That (hopefully) includes RedHat, Fedora, CentOS, OpenSuSE                   |
|                                                                              |
| If you experience any problems using these or other distributions, please    |
| report that to the NagVis team.                                              |
+------------------------------------------------------------------------------+
| Do you want to proceed? [y]:
+------------------------------------------------------------------------------+
| Starting installation of NagVis 1.8.5                                        |
+------------------------------------------------------------------------------+
|                                                                              |
+--- Checking for tools -------------------------------------------------------+
| Using packet manager /usr/bin/rpm                                      found |
|                                                                              |
+--- Checking paths -----------------------------------------------------------+
| Please enter the path to the nagios base directory [/usr/local/nagios]:
|   nagios path /usr/local/nagios                                        found |
| Please enter the path to NagVis base [/usr/local/nagvis]:
|                                                                              |
+--- Checking prerequisites ---------------------------------------------------+

| PHP 5.4                                                                found |
|   PHP Module: gd php                                                   found |
|   PHP Module: mbstring php                                             found |
|   PHP Module: gettext compiled_in                                      found |
|   PHP Module: session compiled_in                                      found |
|   PHP Module: xml php                                                  found |
|   PHP Module: pdo php                                                  found |
|   Apache mod_php                                                       found |
| Do you want to update the backend configuration? [n]: | Graphviz 2.30                                                                                                                                                  found |
|   Graphviz Module dot 2.30.1                                           found |
|   Graphviz Module neato 2.30.1                                         found |
|   Graphviz Module twopi 2.30.1                                         found |
|   Graphviz Module circo 2.30.1                                         found |
|   Graphviz Module fdp 2.30.1                                           found |
| SQLite 3.7                                                             found |
|                                                                              |
+--- Trying to detect Apache settings -----------------------------------------+
| Please enter the web path to NagVis [/nagvis]:
| Please enter the name of the web-server user [apache]:
| Please enter the name of the web-server group [apache]:
| create Apache config file [y]:
|                                                                              |
+--- Checking for existing NagVis ---------------------------------------------+
| NagVis UNKNOWN                                                         found |
| Do you want the installer to update your config files when possible? [y]:
| Remove backup directory after successful installation? [n]:
|                                                                              |
+------------------------------------------------------------------------------+
| Summary                                                                      |
+------------------------------------------------------------------------------+
| NagVis home will be:           /usr/local/nagvis                             |
| Owner of NagVis files will be: apache                                        |
| Group of NagVis files will be: apache                                        |
| Path to Apache config dir is:  /etc/httpd/conf.d                             |
| Apache config will be created: yes                                           |
|                                                                              |
| Installation mode:             update                                        |
| Old version:                   UNKNOWN                                       |
| New version:                   1.8.5                                         |
| Backup directory:              /usr/local/nagvis.old-2016-08-06_02:52:02     |
|                                                                              |
| Note: The current NagVis directory will be moved to the backup directory.    |
|       The backup directory will be NOT removed after successful installation |
|                                                                              |
|          !!! UPDATE FROM VERSION "UNKNOWN" IS NOT SUPPORTED !!!              |
|       You have to move your custom files manually from backup directory.     |
|                                                                              |
| Do you really want to continue? [y]:
+------------------------------------------------------------------------------+
| Starting installation                                                        |
+------------------------------------------------------------------------------+
| Moving old NagVis to /usr/local/nagvis.old-2016-08-06_02:52:02..       done  |
| Creating directory /usr/local/nagvis...                                done  |
| Creating directory /usr/local/nagvis/var...                            done  |
| Creating directory /usr/local/nagvis/var/tmpl/cache...                 done  |
| Creating directory /usr/local/nagvis/var/tmpl/compile...               done  |
| Creating directory /usr/local/nagvis/share/var...                      done  |
| Copying files to /usr/local/nagvis...                                  done  |
| Creating directory /usr/local/nagvis/etc/profiles...                   done  |
| Creating main configuration file...                                    done  |
|   Adding webserver group to file_group...                              done  |
| Creating web configuration file...                                     done  |
| Setting permissions for web configuration file...                      done  |
|                                                                              |
|                                                                              |
|                                                                              |
+--- Setting permissions... ---------------------------------------------------+
| /usr/local/nagvis/etc/nagvis.ini.php-sample                            done  |
| /usr/local/nagvis/etc                                                  done  |
| /usr/local/nagvis/etc/maps                                             done  |
| /usr/local/nagvis/etc/maps/*                                           done  |
| /usr/local/nagvis/etc/geomap                                           done  |
| /usr/local/nagvis/etc/geomap/*                                         done  |
| /usr/local/nagvis/etc/profiles                                         done  |
| /usr/local/nagvis/share/userfiles/images/maps                          done  |
| /usr/local/nagvis/share/userfiles/images/maps/*                        done  |
| /usr/local/nagvis/share/userfiles/images/shapes                        done  |
| /usr/local/nagvis/share/userfiles/images/shapes/*                      done  |
| /usr/local/nagvis/var                                                  done  |
| /usr/local/nagvis/var/*                                                done  |
| /usr/local/nagvis/var/tmpl                                             done  |
| /usr/local/nagvis/var/tmpl/cache                                       done  |
| /usr/local/nagvis/var/tmpl/compile                                     done  |
| /usr/local/nagvis/share/var                                            done  |
|                                                                              |
+------------------------------------------------------------------------------+
| Installation complete                                                        |
|                                                                              |
| You can safely remove this source directory.                                 |
|                                                                              |
| For later update/upgrade you may use this command to have a faster update:   |
| ./install.sh -n /usr/local/nagios -p /usr/local/nagvis -u apache -g apache -w                                                                                         /etc/httpd/conf.d -a y
|                                                                              |
| 1.4 to 1.6x upgrade: The map permissions have ben reset. Old permissions     |
| have been backed up in nagvis/etc/auth-backup file. You need to migrate      |
| these permissions manually using using the new user/role management GUI.     |
|                                                                              |
| What to do next?                                                             |
| - Read the documentation                                                     |
| - Maybe you want to edit the main configuration file?                        |
|   Its location is: /usr/local/nagvis/etc/nagvis.ini.php                      |
| - Configure NagVis via browser                                               |
|   <http://localhost/nagvis/config.php>                                       |
| - Initial admin credentials:                                                 |
|     Username: admin                                                          |
|     Password: admin                                                          |
+------------------------------------------------------------------------------+

Step 5

Restart the httpd service with

service httpd restart

then open the url with hostname or IP address like http://192.168.XX.XX/nagvis

it will open but some times it will gives you access denied issue on /ngavis.

if that so you have to follow the changes in nagvis configuration file.

goto /etc/httpd/conf.d

edit the nagvis.conf file with your favorite editor. It will like below.

Alias /nagvis "/usr/local/nagvis/share"

<Directory "/usr/local/nagvis/share">
  Options FollowSymLinks
  AllowOverride None
  Order allow,deny
  Allow from all

just uncommand the AllowOverride None and add the Require all granted like below

Alias /nagvis "/usr/local/nagvis/share"

<Directory "/usr/local/nagvis/share">
  Options FollowSymLinks
#AllowOverride None
  Require all granted
  Order allow,deny
  Allow from all

Now restart the httpd service it will work fine. 

Enjoy.......

No comments:

Post a Comment

Permanent hostname setup for RHEL7

Step 1 Set the host name on NMTUI tool like following nmtui set host name   then save and exit Step 2 add the following l...