monitor-ninja
monitor-ninja copied to clipboard
showlog uses hardcoaded cgi.cfg not compatible with naemon
Hi Guys,
Please have a look at this line : https://github.com/op5/ninja/blob/500b186445aba158ac1d8cc57072e785287e93be/modules/monitoring/helpers/showlog.php#L38 : $etc_path = System_Model::get_nagios_etc_path(); $cgi_cfg = rtrim($etc_path, '/').'/cgi.cfg';
In a standard naemon install etc directory is here :
$config['nagios_etc_path'] = '/etc/naemon/';
as defined also in /var/www/html/ninja/application/config/config.php
showlog.php looks into this path for cgi.cfg : /etc/naemon/cgi.cfg but standard naemon install place cgi.cfg in /etc/thruk/cgi.cfg .
Quickfix is to create a symlink between /etc/thruk/cgi.cfg /etc/naemon/cgi.cfg but I would suggest cgi.cfg and nagios.cfg files not to be hardcoaded into the code but used as user defined variables in ninja/application/config/config.php .
The problem with cgi.cfg not being available to ninja is that Ninja will not display the Event Log in Menu : Report / EventLog
Cheers, Adrian