Pesquisar neste blog

sexta-feira, 6 de janeiro de 2012

Como instalar o Nagvis 1.6.2

Este Howto funciona para Debian / Ubuntu / CentOS / RedHat / SuSE!

Website: http://www.nagvis.org/
wget http://sourceforge.net/projects/nagvis/files/NagVis%201.6/nagvis-1.6.2.tar.gz/download

No meu caso como será mostrado no processo de instalação do Nagvis, eu usei MK_Livestatus, ferramenta usada para acesso as estruturas internas do Nagios desenvolvida por Mathias Kettner, sua versão atual é a 1.1.6p1.
Porque usei o mk_livestatus?
A resposta é simples:

  • essa ferramenta usa o Nagios Event Broker API;
  • Não precisa de base de dados;
  • Os dados podem ser obtidos sob demanda;
  • Trabalha com uma gama muito alta de informações.

Em outro artigo mostrarei como efetuar a sua instalação com mais detalhes.

Instalar as dependências e começar a instalar o script

O mk_livestatus caso alguém opte por usá-lo.

yum install rsync graphviz
ou
apt-get install graphviz

tar -zxf nagvis-1.6.2.tar.gz
cd nagvis-1.6.2
./install.sh


+------------------------------------------------------------------------------+
| Welcome to NagVis Installer 1.6.2                                            |
+------------------------------------------------------------------------------+
| This script is built to facilitate the NagVis installation and update        |
| procedure for you. The installer has been tested on the following systems:   |
| - Debian Etch, Hardy (4.0, 5.0)                                              |
| - Ubuntu Hardy, Intrepid, Jaunty, Karmic, Lucid (8.04 to 10.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.6.2                                        |
+------------------------------------------------------------------------------+
| OS  : Debian GNU/Linux 6.0                                                   |
|                                                                              |
+--- Checking for tools -------------------------------------------------------+
| Using packet manager /usr/bin/dpkg                                     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]: /usr/local/nagios/nagvis
|                                                                              |
+--- Checking prerequisites ---------------------------------------------------+
| PHP 5.3                                                                found |
|   PHP Module: gd 5.3                                                   found |
|   PHP Module: mbstring compiled_in                                     found |
|   PHP Module: gettext compiled_in                                      found |
|   PHP Module: session compiled_in                                      found |
|   PHP Module: xml compiled_in                                          found |
|   PHP Module: pdo compiled_in                                          found |
|   Apache mod_php                                                       found |
| Checking Backends. (Available: mklivestatus,ndo2db,ido2db,merlinmy)          |
| Do you want to use backend mklivestatus? [y]:
| Do you want to use backend ndo2db? [n]:
| Do you want to use backend ido2db? [n]:
| Do you want to use backend merlinmy? [n]:
|   Livestatus Socket (/usr/local/nagios/var/rw/live)                    found |
|   PHP Module: sockets compiled_in                                      found |
| Graphviz 2.26                                                          found |
|   Graphviz Module dot 2.26.3                                           found |
|   Graphviz Module neato 2.26.3                                         found |
|   Graphviz Module twopi 2.26.3                                         found |
|   Graphviz Module circo 2.26.3                                         found |
|   Graphviz Module fdp 2.26.3                                           found |
No packages found matching sqlite.
| WARNING: The SQLite package was not found.                                   |
|          This may not be a problem if you installed it from source           |
|                                                                              |

+--- Trying to detect Apache settings -----------------------------------------+
| Please enter the web path to NagVis [/nagvis]:
| Please enter the name of the web-server user [www-data]:
| Please enter the name of the web-server group [www-data]:
| create Apache config file [y]:
|                                                                              |
+------------------------------------------------------------------------------+
| Summary                                                                      |
+------------------------------------------------------------------------------+
| NagVis home will be:           /usr/local/nagios/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:             new                                        |
| New version:                   1.6.2                                         |
|                                                                              |
|                                                                              |
| Do you really want to continue? [y]:
+------------------------------------------------------------------------------+
| Starting installation                                                        |
+------------------------------------------------------------------------------+
| Creating directory /usr/local/nagios/nagvis...                         done  |
| Creating directory /usr/local/nagios/nagvis/var...                     done  |
| Creating directory /usr/local/nagios/nagvis/var/tmpl/cache...          done  |
| Creating directory /usr/local/nagios/nagvis/var/tmpl/compile...        done  |
| Creating directory /usr/local/nagios/nagvis/share/var...               done  |
| Copying files to /usr/local/nagios/nagvis...                           done  |
| Creating directory /usr/local/nagios/nagvis/etc/profiles...            done  |
| Creating main configuration file...                                    done  |
| adding base="/usr/local/nagios/nagvis"                                 done  |
|   Adding webserver group to file_group...                              done  |
| Creating web configuration file...                                     done  |
| Setting permissions for web configuration file...                      done  |
|                                                                              |
|                                                                              |
|                                                                              |
+--- Setting permissions... ---------------------------------------------------+
| /usr/local/nagios/nagvis/etc/nagvis.ini.php-sample                     done  |
| /usr/local/nagios/nagvis/etc                                           done  |
| /usr/local/nagios/nagvis/etc/maps                                      done  |
| /usr/local/nagios/nagvis/etc/maps/*                                    done  |
| /usr/local/nagios/nagvis/etc/automaps                                  done  |
| /usr/local/nagios/nagvis/etc/automaps/*                                done  |
| /usr/local/nagios/nagvis/etc/profiles                                  done  |
| /usr/local/nagios/nagvis/share/userfiles/images/maps                   done  |
| /usr/local/nagios/nagvis/share/userfiles/images/maps/*                 done  |
| /usr/local/nagios/nagvis/share/userfiles/images/shapes                 done  |
| /usr/local/nagios/nagvis/share/userfiles/images/shapes/*               done  |
| /usr/local/nagios/nagvis/var                                           done  |
| /usr/local/nagios/nagvis/var/*                                         done  |
| /usr/local/nagios/nagvis/var/tmpl                                      done  |
| /usr/local/nagios/nagvis/var/tmpl/cache                                done  |
| /usr/local/nagios/nagvis/var/tmpl/compile                              done  |
| /usr/local/nagios/nagvis/share/var                                     done  |
|                                                                              |
| Removing backup directory                                              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/nagios/nagvis -u www-data -g www-data -w /etc/apache2/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/nagios/nagvis/etc/nagvis.ini.php               |
| - Configure NagVis via browser                                               |
|   <http://localhost/nagvis/config.php>                                       |
| - Initial admin credentials:                                                 |
|     Username: admin                                                          |
|     Password: admin                                                          |
+------------------------------------------------------------------------------+

4 comentários:

Unknown disse...


| Apache mod_php MISSING

como eu concerto isso, meu nagvis ainda nao quer funcionar =(

Marcos Abadi disse...

Olá Kézia,
basta você fazer a instalação do php.

Se voce estiver usando Debian:
# apt-get install php

Se estiver usando CentOS
# yum install php

Unknown disse...

Oi Marcos, obrigada a dica.

Unknown disse...

Estou com um outro problema q nao consigo resolver, logo q acabei de instalar o nagvis ao abrir a pagina apareceu um erro: Unable to open auth database (/usr/local/nagvis/etc/auth.db)

Voce tem ideia do que poderia ser? Este arquivo auth.db nao existe no servidor '-'