nagiosxi.xi_cmp_scheduledreports_log Error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
sib
Posts: 111
Joined: Thu Dec 11, 2014 8:06 am

nagiosxi.xi_cmp_scheduledreports_log Error

Post by sib »

Hello,

Recently I've discover and error while i was trying to schedule "Schedule Page" which creates new "Scheduled Report"

However when i want to run the report and click on report history i see below error:
SQL Error [nagiosxi] : Table 'nagiosxi.xi_cmp_scheduledreports_log' doesn't exist

Can you tell me how to fix it?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: nagiosxi.xi_cmp_scheduledreports_log Error

Post by ssax »

Please run these commands:

Code: Select all

cd /tmp
rm -rf /tmp/nagiosxi
wget https://assets.nagios.com/downloads/nagiosxi/5/xi-5.8.3.tar.gz
tar zxf xi-5.8.3.tar.gz
cd /tmp/nagiosxi
mysql -f -uroot -pnagiosxi nagiosxi < /tmp/nagiosxi/nagiosxi/nagiosxi-db/mods/mysql/schema_5800.sql
See if that resolves it.
sib
Posts: 111
Joined: Thu Dec 11, 2014 8:06 am

Re: nagiosxi.xi_cmp_scheduledreports_log Error

Post by sib »

ssax wrote:Please run these commands:

Code: Select all

cd /tmp
rm -rf /tmp/nagiosxi
wget https://assets.nagios.com/downloads/nagiosxi/5/xi-5.8.3.tar.gz
tar zxf xi-5.8.3.tar.gz
cd /tmp/nagiosxi
mysql -f -uroot -pnagiosxi nagiosxi < /tmp/nagiosxi/nagiosxi/nagiosxi-db/mods/mysql/schema_5800.sql
See if that resolves it.
Is it has to be root user for mysql? Or can it be nagios user? Should i stop nagios service before executing those commands and re-start it afterwards?
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: nagiosxi.xi_cmp_scheduledreports_log Error

Post by benjaminsmith »

Hi Sib,

Helping out on this post. You'll want to log into MySQL as the root user to make that change. Also, I would recommend taking a full backup before doing so.

It wouldn't be necessary to restart the Nagios service for that change.

Let us know if that resolves the issue.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
bpennin
Posts: 78
Joined: Tue Feb 20, 2018 2:23 pm

Re: nagiosxi.xi_cmp_scheduledreports_log Error

Post by bpennin »

I see the same error and was wondering if the above fix worked on this?
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: nagiosxi.xi_cmp_scheduledreports_log Error

Post by vtrac »

Hi,
How are you doing?

Please run the below command on your XI command prompt to list out all tables of "nagiosxi":
Just want to see if "xi_cmp_scheduledreports_log" existed.

Code: Select all

echo "show tables;" | mysql -f -uroot -pnagiosxi nagiosxi --table
Please share outputs of the above command.

Please restart these services:

Code: Select all

systemctl restart mariadb

systemctl restart nagios
Now, please try your report again.

If issue still existed, please upload (share) screenshots of the issue screen.

Also, please upload "profile.zip":
Nagios XI GUI > Admin > System Config > System Profile


Best Regards,
Vinh
bpennin
Posts: 78
Joined: Tue Feb 20, 2018 2:23 pm

Re: nagiosxi.xi_cmp_scheduledreports_log Error

Post by bpennin »

[root@lnxvnaghq001 ~]# echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2)'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -uroot -pnagiosxi --table |grep -i xi_cmp
| xi_cmp_ccm_backups | 0.02 |
| xi_cmp_favorites | 0.03 |
| xi_cmp_nagiosbpi_backups | 0.45 |
| xi_cmp_trapdata | 0.03 |
| xi_cmp_trapdata_log | 0.03 |


The table does not exist for me. See the profile zip added. We restart Nagios every night so no need to try the stop and start of the mariadb and nagios service as that was already done.
You do not have the required permissions to view the files attached to this post.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: nagiosxi.xi_cmp_scheduledreports_log Error

Post by vtrac »

Hi,
How are you doing?
Yes, that table does not existed.

Please try the step below as suggested by Sean. I have tried this on my VM and it works.

Code: Select all

cd /tmp
rm -rf /tmp/nagiosxi
wget https://assets.nagios.com/downloads/nagiosxi/5/xi-5.8.3.tar.gz
tar zxf xi-5.8.3.tar.gz
cd /tmp/nagiosxi
mysql -f -uroot -pnagiosxi nagiosxi < /tmp/nagiosxi/nagiosxi/nagiosxi-db/mods/mysql/schema_5800.sql
Once done, please check again and see if that table exists:

Code: Select all

echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2)'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -uroot -pnagiosxi --table |grep -i xi_cmp
or

Code: Select all

echo "show tables;" | mysql -f -uroot -pnagiosxi nagiosxi --table

Regards,
Vinh
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: nagiosxi.xi_cmp_scheduledreports_log Error

Post by vtrac »

Hi,
Please NOTE, the last "mysql" line is a ONE line command.

cd /tmp
rm -rf /tmp/nagiosxi
wget https://assets.nagios.com/downloads/nag ... 8.3.tar.gz
tar zxf xi-5.8.3.tar.gz
cd /tmp/nagiosxi

mysql -f -uroot -pnagiosxi nagiosxi < /tmp/nagiosxi/nagiosxi/nagiosxi-db/mods/mysql/schema_5800.sql


Regards,
Vinh
User avatar
MonitorGuy
Posts: 46
Joined: Wed May 20, 2020 8:22 am

Re: nagiosxi.xi_cmp_scheduledreports_log Error

Post by MonitorGuy »

Checked our Nagios XI server and it's reporting the same table missing:

dbmaint.log: <p><pre>SQL Error [nagiosxi] : Table 'nagiosxi.xi_cmp_scheduledreports_log' doesn't exist</pre></p>
dbmaint.log: <p><pre>SQL Error [nagiosxi] : Table 'nagiosxi.xi_cmp_scheduledreports_log' doesn't exist</pre></p>
dbmaint.log: <p><pre>SQL Error [nagiosxi] : Table 'nagiosxi.xi_cmp_scheduledreports_log' doesn't exist</pre></p>

We don't have scheduled reports, since that feature is only available with Enterprise Edition, which we do not have.

Appears to be a bug since dbmaint shouldn't be checking for this table unless it's running Enterprise.

Craig
<<MonitorGuy>>
Locked