NagVis - paths in configuration


#1

Hello everyone!

Does anybody have an idea how to finish the process of NagVis configuration? I have followed official NagVis documentation but I could not find there some verification part in which successful installation of NagVis is confirmed.

In my opinion the problem is in definition of paths.

Let me decribe what has been already done:
OS: SuSE Linux Enterprise Server 10 SP2
Nagios 3.0.4 - working, installed from RPM
Centreon 2.0.1 - working, installed from RPM

PHP5 modules installed: php5-gd, php5-gettext, php5-mysql, php5-mbstring, php5-session, php5-xmlreader, php5-xmlrpc
PHP5 module missing: php5-xml (N/A for SuSE Linux, installation from MDV RPM crashed on various dependencies)

Directories, where Nagios has files:
/etc/nagios - confugiration files
/var/log/nagios
/var/lib/nagios
/var/run/nagios
/var/spool/nagios
/usr/share/nagios
/usr/lib/nagios

tree -d -L 2 /usr/lib/nagios/ /usr/share/nagios/

/usr/lib/nagios/
|-- brokers
|-- cgi
-- plugins– eventhandlers
/usr/share/nagios/
|-- contexthelp
|-- docs
| -- images |-- images |– logos
|-- media
|-- nagvis
| |-- docs
| |-- etc
| |-- nagvis
| |-- var
| -- wui |-- ssi– stylesheets

ls /usr/share/nagios/nagvis/etc/

.htaccess maps nagvis.ini.php nagvis.ini.php.rpmsave nagvis.ini.php-sample

ls -l /srv/www/htdocs/

celkem 8
-rw-r–r-- 1 root root 329 2009-05-18 11:33 index.html
lrwxrwxrwx 1 root root 25 2009-09-21 14:51 nagvis -> /usr/share/nagios/nagvis/
drwxr-xr-x 3 root root 4096 2009-05-17 15:09 system

Part of /usr/share/nagios/nagvis/etc/nagvis.ini.php

; path options
[paths]
; absolute physical NagVis path
base="/usr/share/nagios/nagvis/"
; absolute html NagVis path
htmlbase="/srv/www/htdocs/"
; htmlbase="/nagios/nagvis"
; absolute html NagVis cgi path
htmlcgi="/usr/lib/nagios/cgi"

In documentation its written that at ](http://)//config.php NagVis can be configured. But what is “path-tp-nagvis”? Suppose, its /usr/share/nagios/nagvis. It makes sense, because config.php is placed in /usr/share/nagios/nagvis/nagvis/ folder. To make the path visible for web server I made a symlink nagvis in /srv/www/nagvis/ pointing to NagVis directory /usr/share/nagios/nagvis. However I have not succeeded to access any file in nagvis directory, trying
](http://)<ip.address.of.server.with.nagios>/nagvis
](http://)<ip.address.of.server.with.nagios>/nagvis/index.php
](http://)<ip.address.of.server.with.nagios>/nagvis/config.php
All the time I get Error 403 - Access denied; for PHP/HTML files and for folders too. All files had 664 permissions and all directories 755 permissions.

.htaccess file contained this

# cat /usr/share/nagios/nagvis/etc/.htaccess
Order Deny,Allow
Deny from ALL

but I renamed it and restarted Apache. It had no effect to accessing nagvis interface or configuration.

I cannot try localhost/nagvis/ because theres no X Window installed at server where Nagios is running.

Thank you for any help in advance!

Leos Junek


#2

My colleague has explained to me what means html base. I had not known before that if html base is e.g. /nagios/nagvis then you can see NagVis interface when you type ](http://)<IP.address.where.Nagios.installed>/nagios/nagvis. No symlink in Apache webserver directory to /usr/share is needed.

Everything is OK now. Problem was solved.

Only path that had to be redefined in Path definition section of /usr/share/nagios/nagvis/etc/nagvis.ini.php was

; Path definitions
[paths]
; absolute physical NagVis path
base="/usr/share/nagios/nagvis/"

It is different from default path (base="/usr/local/nagios/share/nagvis/) because Nagios was installed from RPM, not compiled from source code.

Leos Junek