I had some difficulties with the documentation for installing Nagvis with IcingaDB.
In the step where you add the EmbeddedWeb to the core.php file, it was unable to find the classes for EmbeddedWeb.
icinga2_icingaweb | [Mon Jul 22 14:25:27.378958 2024] [php7:error] [pid 4846] [client 172.20.0.1:46090] PHP Fatal error: main(): Failed opening required 'Icinga/Application/EmbeddedWeb.php' (include_path='.:/usr/share/php:../../server/core/classes:../../server/core/classes/objects:../../server/core/ext/php-gettext-1.0.12:../../frontend/nagvis-js/classes/') in /data/usr/local/nagvis/share/server/core/functions/core.php on line 8
I had to add icingaweb2 library to the path to resolve this.
$path = '/usr/share/icingaweb2/library';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
/**
* Icinga Web 2 integration
*/
use Icinga\Application\EmbeddedWeb;
require_once 'Icinga/Application/EmbeddedWeb.php';
require_once EmbeddedWeb::start('/usr/share/icingaweb2', '/etc/icingaweb2')
->getModuleManager()
->getModule('nagvis')
->getLibDir() . '/nagvis-includes/init.inc.php';
Any suggestions on why this was needed? I am using this inside a docker environment if that helps.
I had some difficulties with the documentation for installing Nagvis with IcingaDB.
In the step where you add the EmbeddedWeb to the core.php file, it was unable to find the classes for EmbeddedWeb.
I had to add icingaweb2 library to the path to resolve this.
Any suggestions on why this was needed? I am using this inside a docker environment if that helps.