Page 1 of 2
nagiosxi.xi_cmp_scheduledreports_log Error
Posted: Sun May 23, 2021 12:05 pm
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?
Re: nagiosxi.xi_cmp_scheduledreports_log Error
Posted: Mon May 24, 2021 10:31 am
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.
Re: nagiosxi.xi_cmp_scheduledreports_log Error
Posted: Tue May 25, 2021 5:45 am
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?
Re: nagiosxi.xi_cmp_scheduledreports_log Error
Posted: Wed May 26, 2021 10:00 am
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.
Re: nagiosxi.xi_cmp_scheduledreports_log Error
Posted: Tue Jun 01, 2021 7:50 am
by bpennin
I see the same error and was wondering if the above fix worked on this?
Re: nagiosxi.xi_cmp_scheduledreports_log Error
Posted: Tue Jun 01, 2021 4:38 pm
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
Re: nagiosxi.xi_cmp_scheduledreports_log Error
Posted: Wed Jun 02, 2021 7:27 am
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.
Re: nagiosxi.xi_cmp_scheduledreports_log Error
Posted: Wed Jun 02, 2021 9:09 am
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
Re: nagiosxi.xi_cmp_scheduledreports_log Error
Posted: Wed Jun 02, 2021 9:17 am
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
Re: nagiosxi.xi_cmp_scheduledreports_log Error
Posted: Sat Jul 10, 2021 12:57 pm
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