Nagvis in Icingaweb2 "The path "../../../var" is not writeable"

nagvis

(Fadel) #1

hey Com,

I tried to implement Nagvis in Icinga2 using the Nagivsplugin and this guide:

https://dokuwiki.nausch.org/doku.php/centos:web_c7:icinga:nagvis

i use the latest Nagvis

unfortunately i did some mistakes I couldn’t fix. And i think this is the reason why
“The path “…/…/…/var” is not writeable” showing up.

First:
while executing the ./install.sh he claims there is something missing.

±-- Checking prerequisites ---------------------------------------------------+
| PHP 7.2 found |
| PHP Module: gd compiled_in 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 MISSING |
| Graphviz 2.38 found |
| Graphviz Module dot 2.38.0 found |
| Graphviz Module neato 2.38.0 found |
| Graphviz Module twopi 2.38.0 found |
| Graphviz Module circo 2.38.0 found |
| Graphviz Module fdp 2.38.0 found |
dpkg-query: no packages found matching sqlite3
| WARNING: The SQLite package was not found. |
| This may not be a problem if you installed it from source |

I could find and install every package except what he notes now.

Second:
while executing “apachectl -t” i get this answer.

AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message
Syntax OK

I would also guess in my nagvis.ini.php is a mistake… :'D

nagvis.ini.php:

Config.ini.php

[global]
file_group=“apache”
language=“de_DE”
[paths]
base="/usr/share/nagvis/"
htmlcgi="/icingaweb2/monitoring"
[defaults]
urltarget="_parent"
hosturl="[htmlcgi]/host/show?host=[host_name]"
hostgroupurl="[htmlcgi]/list/hosts?hostgroup=[hostgroup_name]"
serviceurl="[htmlcgi]/service/show?host=[host_name]&service=[service_description]"
servicegroupurl="[htmlcgi]/list/services?servicegroup=[servicegroup_name]"
backend=“live_1”
[index]
[automap]
defaultparams="&childLayers=2"
defaultroot=“SECRETHOST
graphvizpath="/usr/bin/"
[wui]
[worker]
[backend_live_1]
backendtype=“mklivestatus”
socket=“unix:/var/run/icinga2/cmd/livestatus”
[backend_ndomy_1]
backendtype=“ndomy”
[rotation_demo]
maps=“demo-germany,demo-ham-racks,demo-load,demo-muc-srv1,demo-geomap,demo-automap”
interval=15
[states]

I also granded the whole path chmod 777 permissions.

i hope someone can help me :stuck_out_tongue:


#2

This is (AFAIK) a warning and shouldn’t be the cause of the problem.

“The path “…/…/…/var” is not writeable” showing up.

Please check whether there is a directory usr/share/nagvis/var. The web user should be owner of all files in this folder.

… which is not the right way to do it…


(Fadel) #3

hey again :stuck_out_tongue:,

i tried what you told me to grant permissions to /usr/share/nagvis/var

now i getting this error:

Error: (0) Undefined property: CorePDOHandler::$dsn
URL: /nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=demo-overview&header_menu=0
File: /usr/share/nagvis/share/server/core/classes/CoreAuthModPDO.php
Line: 58
#0 /usr/share/nagvis/share/server/core/classes/CoreAuthModPDO.php(58): nagvisExceptionErrorHandler(8, ‘Undefined prope…’, ‘/usr/share/nagv…’, 58, Array)
#1 /usr/share/nagvis/share/server/core/classes/CoreAuthHandler.php(47): CoreAuthModPDO->__construct()
#2 /usr/share/nagvis/share/server/core/functions/index.php(44): CoreAuthHandler->__construct()
#3 /usr/share/nagvis/share/frontend/nagvis-js/index.php(53): require(’/usr/share/nagv…’)
#4 {main}

any solutions for that?


#4

I’m not sure but it seems the DB information/credentials isn’t set (correctly).