Page 1 of 2

NagVis integration

Posted: Tue Apr 20, 2010 4:32 pm
by admin
Hi all - we just finished up with some NagVis integration documentation and scripts. For those of you who are interested, you can find the document on integrating Nagvis with XI at http://library.nagios.com/library/produ ... -nagios-xi.

You'll have to be running the 2009R1.2 pre-release code in order to get the integration to work. You can get the 1.2 pre-release code by downloading the latest devel snapshot (http://assets.nagios.com/downloads/nagi ... vel.tar.gz) and updating your XI instance.

Re: NagVis Documentation Available For Testing

Posted: Tue Apr 20, 2010 8:44 pm
by TSCAdmin
I've performed a NagVis install using the docs on a manual server installation. Comments below:

1) rpmdevtools (specifically rpmdev-vercmp) is needed by the 2009R1.2 installer. This package is provided by EPEL, but there's no facility to install the EPEL repo in the upgrade.
2) I have no "localhost" definied for the automap. The "localhost" name was changed to the actual hostname after the NagiosXI install. This can be changed by editing /usr/local/nagios/share/nagvis/etc/nagvis.ini.php and adding the defaultroot=hostname variable to the automap portion of the config (ex: defaultroot="Nova").

Other than that, the install was clean and is working just fine. Next I'll test adding the automap and custom maps into a dashboard.

Re: NagVis Documentation Available For Testing

Posted: Tue Apr 20, 2010 9:36 pm
by TSCAdmin
Putting it into a dashlet (duping the simple url dashlet & modifying it from google to the nagvis automap url) also worked well.

I would recommend restricting the height & width of the map created by using the url parameters, however, otherwise the map is too large for the dashlet. Example:

Code: Select all

DASHLET_URL => "http://nova/nagios/nagvis/nagvis/index.php?automap&width=800&height=600",

Re: NagVis Documentation Available For Testing

Posted: Tue May 11, 2010 5:03 pm
by tonyyarusso
1) rpmdevtools (specifically rpmdev-vercmp) is needed by the 2009R1.2 installer. This package is provided by EPEL, but there's no facility to install the EPEL repo in the upgrade.
This is correct, and part of a larger mess of different things being available for different platforms. Essentially we should just be inserting EPEL in where DAG (obsolete) used to be.

Re: NagVis integration

Posted: Thu May 27, 2010 1:53 pm
by TSCAdmin
The version of graphviz in the EPEL repo is 2.12

Unfortunately, NagVis needs graphviz 2.14, and won't install with the current instructions.

Re: NagVis integration

Posted: Thu May 27, 2010 2:14 pm
by tonyyarusso
Nagios XI also enables the DAG repo, which has graphviz version 2.22. Also, all the NagVis documentation says is "(Earlier versions (with lower version numbers) have some problems with truecolor rendering)" - does that make it not work at all, or are the colors just a little off?

Re: NagVis integration

Posted: Thu May 27, 2010 2:28 pm
by TSCAdmin
I was using the xi-latest tarball (manual install), which seems to do the full replacement of DAG with EPEL. After the NagiosXI install, I tried to do the NagVis install and that's when I ran into the configuration problem.

The "NagVis Installer" aborted after the graphviz >= 2.14 check was performed, so the install/compile failed to complete.

Code: Select all

[root@server ~]# cat /usr/local/nagiosxi/var/xiversion
###################################
# DO NOT DELETE THIS FILE!
# Nagios XI version information
###################################
full=2009R1.2
major=2009
minor=R1.2
releasedate=2010-04-12
release=113

Code: Select all

+------------------------------------------------------------------------------+
| Welcome to NagVis Installer 0.2.11                                            |
+------------------------------------------------------------------------------+
| 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 (4.0)                                                          |
| - Ubuntu Hardy (8.04)                                                        |
| - Ubuntu Intrepid (8.10)                                                     |
| - SuSE Linux Enterprise Server 10                                            |
|                                                                              |
| 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.                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
| Starting installation of NagVis 1.4.6                                        |
+------------------------------------------------------------------------------+
| OS  : CentOS release 5.5 (Final)                                             |
| Perl: 5.008008                                                               |
|                                                                              |
+--- Checking for tools -------------------------------------------------------+
| Using packet manager /bin/rpm                                          found |
|                                                                              |
+--- Checking paths -----------------------------------------------------------+
| nagios path /usr/local/nagios                                          found |
|                                                                              |
+--- Checking prerequisites ---------------------------------------------------+
| Nagios Core 3.2.0                                                      found |
| Checking Backends: ndo2db                                                    |
|   /usr/local/nagios/bin/ndo2db (ndo2db)                                found |
| PHP 5.1                                                                found |
|   Module: gd php                                                       found |
|   Module: mysql php                                                    found |
|   Module: mbstring php                                                 found |
|   Module: gettext compiled_in                                          found |
|   Module: session compiled_in                                          found |
|   Module: xml php                                                      found |
|   Apache mod_php                                                       found |
| Graphviz 2.12
2.12                                                     found |
|  Error: Version >= 2.14 needed
|   Graphviz Module dot 2.12                                             found |
|  Error: Version >= 2.14 needed
|   Graphviz Module neato 2.12                                           found |
|  Error: Version >= 2.14 needed
|   Graphviz Module twopi 2.12                                           found |
|  Error: Version >= 2.14 needed
|   Graphviz Module circo 2.12                                           found |
|  Error: Version >= 2.14 needed
|   Graphviz Module fdp 2.12                                             found |
|  Error: Version >= 2.14 needed
|                                                                              |
+--- Errors found during check of prerequisites. Aborting...
--2010-05-27 10:01:55--  http://assets.nagios.com/downloads/nagiosxi/scripts/NagiosXI-Nagvis-adjust_config.py
Resolving usproxy1... 10.200.52.1
Connecting to usproxy1|10.200.52.1|:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: 4019 (3.9K) [text/plain]
Saving to: `NagiosXI-Nagvis-adjust_config.py'

100%[===========================================================================================================================================>] 4,019       --.-K/s   in 0.001s  

2010-05-27 10:01:55 (3.07 MB/s) - `NagiosXI-Nagvis-adjust_config.py' saved [4019/4019]

Traceback (most recent call last):
  File "./NagiosXI-Nagvis-adjust_config.py", line 5, in ?
    config = open('/usr/local/nagios/share/nagvis/etc/nagvis.ini.php', 'r')
IOError: [Errno 2] No such file or directory: '/usr/local/nagios/share/nagvis/etc/nagvis.ini.php'
Reloading httpd:                                           [  OK  ]

=============================
NagVis Installation Complete!
=============================

Re: NagVis integration

Posted: Thu May 27, 2010 4:32 pm
by tonyyarusso
I'm a bit confused about your claims regarding the tarball, as I just downloaded both xi-latest and xi-latest-devel and this is what I found in 0-yum in each of them:

xi-latest:

Code: Select all

echo "Installing Dag repo..."

cp nagiosxi/dag.repo /etc/yum.repos.d
rpm --import nagiosxi/RPM-GPG-KEY.dag.txt 
xi-latest-devel:

Code: Select all

echo "Installing Dag repo..."

cp nagiosxi/dag.repo /etc/yum.repos.d
rpm --import nagiosxi/RPM-GPG-KEY.dag.txt 

echo "Enabling EPEL repo..."
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm 
On the other hand, it's good to know that EPEL's not up to speed yet...

Re: NagVis integration

Posted: Fri May 28, 2010 12:14 pm
by TSCAdmin
Well, that's interesting ... the cp line for the dag repo is missing from my 0-yum script. I've got the import key line, but the cp line isn't there. I'm guessing one of my coworkers edited the config for some reason (possibly accidentally).

I'll go back and get a fresh copy of the xi-latest-devel and give it another whirl.

Re: NagVis integration

Posted: Tue Jun 08, 2010 1:51 pm
by TSCAdmin
Not that it deals specifically with this documentation, but for version 1.5 of Nagvis (in case you were going to update to that version later) ...

The dbpass for mysql user "ndoutils" contains an "@" symbol, causing the configuration to be rejected as invalid.

As a work around, I created a new user with the same privs as nodutils, but with a password without the "@". Then I reconfigured the nagvis.ini.php file to change the dbpass and dbuser.