Sie sind auf Seite 1von 10

Eng.

Yahya alnahsi

ynahesi@gmail.com

NagVis
What is NagVis ?
NagVis is a visualization addon for the well known network management system Nagios
and Icinga which is a fork of Nagios
NagVis can be used to visualize Nagios data, e.g. to display IT processes like a mail system or
a network infrastructure. Using data supplied by a backend it will update objects placed on
maps in certain intervals to reflect the current state. These maps allow to arrange the
objects to display them in different layouts:
physical e.g. all hosts in a rack/room/department
logical

e.g. all application servers

geographical e.g. all hosts in a country


business processes e.g. all hosts/services involved in a process
How does NagVis work?
In general NagVis is a presentation tool for the information which is gathered by Nagios and
transferred using backends.
The supported backends are:
mklivestatus (default since NagVis 1.5)
NDOUtils / IDOUtils (requires MySQL)
merlin (requires MySQL)

Licensing
NagVis is free software; you can redistribute it and/or modify it under the terms of the GNU
General Public License version 2 as published by the Free Software Foundation.

NagVis is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.

Eng. Yahya alnahsi

ynahesi@gmail.com

System requirements
Nagios / Icinga (installed, configured, running)
You need an installed, configured and running Nagios to get NagVis working.
You can get Nagios from the official Nagios Homepage.
More information on available Icinga packages/downloads can be found on the official Icinga
website.
MKLivestatus (installed, added to Nagios)

Since NagVis 1.5 we switched the default backend to MKLivestatus since it is much faster,
more lightweight and stable than the NDO. And last but not least it is easy to handle and to
install. You don't need any database to get MKLivestatus running.
MKLivestatus is an Event Broker Module for Nagios which serves a unix socket where third
party addons like NagVis can connect to for gathering live status information in a very fast
way.
You can get MKLivestatus from the official MKLivestatus Homepage.
Webserver with PHP support
NagVis is a web based application realised in Javascript and PHP. You need a webserver with
PHP support to run NagVis. We recommend the usage of Apache Webserver with mod_php.
The minimum version requirement of PHP is 5.0.0.

PHP modules needed


Besides the base php packet you need the following modules in your PHP installation. The
names of the modules may vary between distributions:
php5-gd
php5-gettext
php5-mbstring
php5-session
php5-json (Builtin since PHP 5.2)
php5-pdo and pdo-sqlite (New in 1.5, for default Authentication/Authorisation module)
Note: Maybe some of these functions are already compiled into your PHP. php -m will show
the built-in modules.

Eng. Yahya alnahsi

ynahesi@gmail.com

Special requirements by backends


The backends connect to external datasources and often need some special modules. Here is
a list of the needed modules for the different backends. You only need to meet the
requirements of the backends you use.
mklivestatus
php-net-socket (Debian) / php5-sockets (SLES)
ndomy
php5-mysql
merlinmy
php5-mysql
Graphviz for the automap

The Automap is based on Graphviz. You need it when you like to use the automap feature.
We recommend the use of Graphviz version >= 2.14 (Earlier versions (with lower version
numbers) have some problems with truecolor rendering).
Graphviz is available in some distributions. When you can not use a precompiled distribution
package, you can get Graphviz from the official Graphviz Homepage for compiling it on your
own.
You will also need more packages like gd, libpng, freetype, ... but if you get graphviz
compiled and/or installed it should work.

Eng. Yahya alnahsi

ynahesi@gmail.com

NagVis Installation:
First of all, switch to root user, so that we dont have to put sudo in-front of every
command:
# sudo -s

# apt-get install g++ make libc6-dev php-net-socket php5-sqlite sqlite3 graphviz


# sudo apt-get install php5 php5-sqlite php5-mysql
# sudo apt-get install php-pear php-apc php5-curl
# cd /usr/local
* Download NagVis:
- Download the latest version of NagVis by the following command to download:
# wget http://sourceforge.net/projects/nagvis/files/NagVis%201.7/nagvis1.7.10.tar.gz

# tar zxvf nagvis-1.7.10.tar.gz

* The above command will extract nagvis tarball in your current directory. Change to
nagvis directory:
# cd nagvis-1.7.10
and install it with command:
# ./install.sh -p /usr/local/nagvis -b ido2db -u www-data -g www-data -w
/etc/apache2/conf.d/ -a y -F

Eng. Yahya alnahsi

ynahesi@gmail.com

The Output :
+------------------------------------------------------------------------------+
| Welcome to NagVis Installer 1.7.10

+------------------------------------------------------------------------------+
| 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]: y
+------------------------------------------------------------------------------+
| Starting installation of NagVis 1.7.10

+------------------------------------------------------------------------------+
| OS : Ubuntu 12.10

+--- Checking for tools -------------------------------------------------------+


| Using packet manager /usr/bin/dpkg

found |

+--- Checking paths -----------------------------------------------------------+|


+--- Checking prerequisites ---------------------------------------------------+|
+--- Checking for existing NagVis ---------------------------------------------+
+------------------------------------------------------------------------------+
| Summary

+------------------------------------------------------------------------------+

Eng. Yahya alnahsi


| NagVis home will be:

ynahesi@gmail.com
/usr/local/nagvis

| Owner of NagVis files will be: www-data

| Group of NagVis files will be: www-data

| Path to Apache config dir is: /etc/apache2/conf.d

| Apache config will be created: yes


| Installation mode:

install

| Do you really want to continue? [y]: y


+------------------------------------------------------------------------------+
| Starting installation

+------------------------------------------------------------------------------+
| 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...


| Creating main configuration file...

done |
done |

| Adding webserver group to file_group...


| Creating web configuration file...

done |
done |

| Setting permissions for web configuration file...

done |

+--- Setting permissions... ---------------------------------------------------+


| /usr/local/nagvis/etc/nagvis.ini.php-sample
| /usr/local/nagvis/etc
| /usr/local/nagvis/etc/maps

done |
done |
done |

| /usr/local/nagvis/etc/maps/*

done |

| /usr/local/nagvis/etc/geomap

done |

Eng. Yahya alnahsi

ynahesi@gmail.com

| /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/*
| /usr/local/nagvis/var
| /usr/local/nagvis/var/*

done |

done |
done |

| /usr/local/nagvis/var/tmpl

done |

| /usr/local/nagvis/var/tmpl/cache

done |

| /usr/local/nagvis/var/tmpl/compile
| /usr/local/nagvis/share/var

done |
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
| 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

+------------------------------------------------------------------------------+

Eng. Yahya alnahsi

ynahesi@gmail.com

NagVis has been installed now. Note down the default admin crdentials of NagVis.
- Open the file /usr/local/nagvis/etc/nagvis.ini.php:
#

nano /usr/local/nagvis/etc/nagvis.ini.php

* Add this to Path definitions section and uncomment the lines as shown below.
; Path definitions
[paths]
; absolute physical NagVis path
base="/usr/local/nagvis/"
; absolute html NagVis path
htmlbase="/nagvis"
; absolute html NagVis cgi path
htmlcgi="/nagios/cgi-bin"

* Scroll down further, you may find the section called Backend definitions.
Comment out the mklivestatus line.
; ---------------------------; Backend definitions
; ---------------------------; Example definition of a livestatus backend.
; In this case the backend_id is live_1
; The path /usr/local/nagios/var/rw has to exist
[backend_live_1]
;backendtype="mklivestatus"

* Save and close the file. Restart apache service to take effect the saved changes.
# /etc/init.d/apache2 restart

Eng. Yahya alnahsi

* Access NagVis Web Interface


- Navigate to http://127.0.0.1/nagvis from your browser.
- Enter the username and password for NagVis.
- The NagVis default username and password are both admin.

ynahesi@gmail.com

Eng. Yahya alnahsi

ynahesi@gmail.com

Das könnte Ihnen auch gefallen