Page 1 of 2

Error deploying 5.8.1

Posted: Mon Mar 01, 2021 9:12 am
by infofedsec
To be compliant with the corporate standards we have had to deploy Nagios via puppet. We have managed to get it installed and the web interface running however the monitoring engine and performance grapher will not run. Additionally when i went download a system profile for this ticket i got profile build failed, code 1.

Re: Error deploying 5.8.1

Posted: Mon Mar 01, 2021 3:07 pm
by dchurch
Nagios XI requires a specific set of permissions in order to work correctly. Some operations will fail intermittently if the permissions are not set properly.

Try running this on the command line (as root):

Code: Select all

cd /usr/local/nagiosxi/scripts
./reset_config_perms.sh
chown -R nagios:nagios  /usr/local/nagios/libexec
chmod -R 755  /usr/local/nagios/libexec

Re: Error deploying 5.8.1

Posted: Tue Mar 02, 2021 9:34 am
by infofedsec
I ran this and nothing changed. The monitoring engine and performance grapher still won't run and profiledownload gives the same error

Re: Error deploying 5.8.1

Posted: Tue Mar 02, 2021 10:13 am
by dchurch
If you're unable to generate the the profile through the web interface, please try generating it from the command line by running these commands as root:

Code: Select all

rm -rf /usr/local/nagiosxi/var/components/profile*
/usr/local/nagiosxi/scripts/components/getprofile.sh SUPPORT
Then send me the resulting /usr/local/nagiosxi/var/components/profile.zip file.
If the profile script fails, please include the ENTIRE output.

Re: Error deploying 5.8.1

Posted: Wed Mar 03, 2021 12:06 pm
by infofedsec
sent you a pm

Re: Error deploying 5.8.1

Posted: Wed Mar 03, 2021 4:00 pm
by dchurch
MySQL is running, but I saw this error when the database was starting up:

Code: Select all

210228  1:53:10 [ERROR] mysqld: Can't create/write to file '/var/run/mariadb/mariadb.pid' (Errcode: 2)
210228  1:53:10 [ERROR] Can't start server: can't create PID file: No such file or directory
Can you verify that directory exists on your nagios xi machine and that it's chowned to mysql:mysql?

Re: Error deploying 5.8.1

Posted: Thu Mar 04, 2021 2:57 pm
by infofedsec
i can confirm its definitely there

Re: Error deploying 5.8.1

Posted: Thu Mar 04, 2021 4:45 pm
by dchurch
I noticed you're also missing some Perl libraries: SOAP::Lite should be installed and isn't. Needed for /usr/local/nagios/libexec/sn_ticketer.pl.

What's the output from the following command:

Code: Select all

service nagios restart

Re: Error deploying 5.8.1

Posted: Thu Mar 04, 2021 4:51 pm
by dchurch
I found more errors:

Code: Select all

    <p><pre>SQL Error [ndoutils] : Table 'nagios.nagios_servicestatus' doesn't exist</pre></p>
    <p><pre>SQL Error [ndoutils] : Table 'nagios.nagios_hoststatus' doesn't exist</pre></p>
Apparently some of the database tables are missing. Perhaps a re-creation of the database is necessary.

Re: Error deploying 5.8.1

Posted: Fri Mar 05, 2021 9:30 am
by infofedsec
Whats the best way to do the recreation? I feel like the repair commands will only repair what exists