Hello,
We are experiencing an issue with the Bulk Modifications Tool, that produces an SQL error as seen in the image below:
We are using several NagiosXI (version 5.3.3) instances with a remote database server, along with separate database instances each of which has a non-default name. From our troubleshooting it seems as if the PHP code for this tool uses an assumed database name of nagiosql, and our database names are different. We were able to clear the error from the page, by removing the explicit database name from the following SELECT lines in /usr/local/nagiosxi/includes/components/bulkmodifications/bulkmodifications.inc.php,
$hostgroups = exec_sql_query(DB_NAGIOSQL, "SELECT `hostgroup_name` as `id`,`hostgroup_name`,`alias` FROM nagiosql.tbl_hostgroup ORDER BY `hostgroup_name`;", true);
$servicegroups = exec_sql_query(DB_NAGIOSQL, "SELECT `servicegroup_name` as `id`,`servicegroup_name`,`alias` FROM nagiosql.tbl_servicegroup ORDER BY `servicegroup_name`;", true);
However we are not sure if this is the best fix. Perhaps it is better to read the database name from the /usr/local/nagiosxi/html/config.inc.php for the SELECT statement, just as it does for the connection information.
Thank you,
Paul
MYSQL Database Issue with Bulk Modifications Tool
MYSQL Database Issue with Bulk Modifications Tool
You do not have the required permissions to view the files attached to this post.
Re: MYSQL Database Issue with Bulk Modifications Tool
Thank you for letting us know. Obviously, you changing the hard coded nagiosql db name will fix it, but I agree with you - it should respect config.inc.php. I was able to verify things on my end, and submit a bug report for this.
Code: Select all
NEW TASK ID 10936 created - Nagios XI Bug Report: Bulk Mod Tool uses hardcoded nagiosql and not config.inc.php
Former Nagios Employee
Re: MYSQL Database Issue with Bulk Modifications Tool
Sounds good. Hopefully, this will be fixed in a future release.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: MYSQL Database Issue with Bulk Modifications Tool
5.4.2 should be released next week. I don't know if it will make it in, but you can always check out https://assets.nagios.com/downloads/nag ... NGES-5.TXT
For now, is there anything more we can do for you, or should we lock the thread?
For now, is there anything more we can do for you, or should we lock the thread?
Re: MYSQL Database Issue with Bulk Modifications Tool
All good for now. Go ahead and lock the thread.
Re: MYSQL Database Issue with Bulk Modifications Tool
Done - feel free to make a new thread if you'd like an update on it.
Former Nagios Employee