Nagios XI url is not available of NagiosXi.xi is missing

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ITOMB_IMT
Posts: 181
Joined: Wed Oct 17, 2018 12:55 pm

Nagios XI url is not available of NagiosXi.xi is missing

Post by ITOMB_IMT »

Hi,

we have Nagios XI 5.6.2 on RHEL environment. All of a sudden, when we tried to login we are seeing SQL errors on Login page. I had to restore XI from backups and we lost data of a day and also the new config added to XI. so we would like to what caused to crash the databases and is there any way to restore that particular table without restoring whole database.please see the attached error on Login page.

Thanks,
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios XI url is not available of NagiosXi.xi is missing

Post by ssax »

It looks like someone deleted the nagiosxi.xi_options table given the error.

Please PM a copy of your profile, you can download it from Admin > System Profile > Download Profile.

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/html/includes/components/profile/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.

Yes, you can restore the individual table, see here:

Code: Select all

https://stackoverflow.com/questions/1013852/can-i-restore-a-single-table-from-a-full-mysql-mysqldump-file
ITOMB_IMT
Posts: 181
Joined: Wed Oct 17, 2018 12:55 pm

Re: Nagios XI url is not available of NagiosXi.xi is missing

Post by ITOMB_IMT »

Please have a look at the PM sent to you.

Thanks,
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios XI url is not available of NagiosXi.xi is missing

Post by ssax »

I do not see a message in my inbox.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios XI url is not available of NagiosXi.xi is missing

Post by ssax »

Looks like you probably have some sudoers issues:

Code: Select all

[Mon Jul 22 10:47:14.182632 2019] [core:notice] [pid 5325] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

sudo: no tty present and no askpass program specified
Please PM me these:

Code: Select all

/etc/sudoers
/etc/sudoers.d  <- Any file that exists in this directory, include it
Since your DB is offloaded you will need to investigate your DB server as well as that external server contains the data, you will need to review your SQL logs on the external DB server to find root cause of a DB table going missing, it would likely have been a manual drop.
ITOMB_IMT
Posts: 181
Joined: Wed Oct 17, 2018 12:55 pm

Re: Nagios XI url is not available of NagiosXi.xi is missing

Post by ITOMB_IMT »

Please see the PM for details asked.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios XI url is not available of NagiosXi.xi is missing

Post by ssax »

Please add this to your /etc/sudoers:

Code: Select all

Defaults:nagios !requiretty
Then restart the apache and nagios services.

Code: Select all

systemctl restart httpd
systemctl restart nagios
Just to be sure, please send the output of this command:

Code: Select all

 grep "User \|Group " /etc/httpd/conf/httpd.conf
ITOMB_IMT
Posts: 181
Joined: Wed Oct 17, 2018 12:55 pm

Re: Nagios XI url is not available of NagiosXi.xi is missing

Post by ITOMB_IMT »

grep "User \|Group " /etc/httpd/conf/httpd.conf
User apache
Group apache
One question, if the nagios.xi_options table is missing can we restore only that table from dump to nagiosxi database and make it functional, instead of restoring the whole database from dump and loosing data( changes made after the backup).
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios XI url is not available of NagiosXi.xi is missing

Post by ssax »

Already answered, this would be the process:
Yes, you can restore the individual table, see here:

Code: Select all

https://stackoverflow.com/questions/1013852/can-i-restore-a-single-table-from-a-full-mysql-mysqldump-file
ITOMB_IMT
Posts: 181
Joined: Wed Oct 17, 2018 12:55 pm

Re: Nagios XI url is not available of NagiosXi.xi is missing

Post by ITOMB_IMT »

Thanks,
if a table in nagiosxi database or any database is missing will it effect monitoring?
Locked