SQL Error [nagiosxi] : ERROR: column "login_attempts" does not exist
LINE 1: SELECT user_id FROM xi_users WHERE (login_attempts >= 3) AN...
Manage Users page SQL error
Manage Users page SQL error
Noticed the following error printed at top of the Manage Users page on our Dev XI server. Please advise.
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
Nagios Fusion 2024R1.0.2
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Manage Users page SQL error
First, try the following:
If that doesn't do it, move to
There are more suggestions at https://support.nagios.com/kb/article.php?id=24, but since this is a dev server, I wonder if it just makes sense to revert to snapshot.
If you want us to dig a bit more, can you PM me your Profile from the dev server? You can download it by going to Admin > System Config > System Profile and click the Download Profile (not Show Profile) button in the top right corner. If for whatever reason you cannot download the profile, please put the output of Show Profile in the thread (that will at least get us some info).
After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
I know you had some problems PMing profiles in the past, though I can't remember the details. Email will work again if need-be.
Code: Select all
cd /usr/local/nagiosxi/scripts/
./repair_databases.sh
Code: Select all
service mysqld stop
cd /var/lib/mysql/nagios
myisamchk -r -f nagios_<corrupted_table>
service mysqld start
rm -f /usr/local/nagiosxi/var/dbmaint.lock
php /usr/local/nagiosxi/cron/dbmaint.ph
If you want us to dig a bit more, can you PM me your Profile from the dev server? You can download it by going to Admin > System Config > System Profile and click the Download Profile (not Show Profile) button in the top right corner. If for whatever reason you cannot download the profile, please put the output of Show Profile in the thread (that will at least get us some info).
After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
I know you had some problems PMing profiles in the past, though I can't remember the details. Email will work again if need-be.
Re: Manage Users page SQL error
Does the suggest repair_database script account for remote DB's?
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
Nagios Fusion 2024R1.0.2
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Manage Users page SQL error
No it does not. You would either have to modify the scripts as appropriate to your configuration or manually run /usr/bin/myisamchk -r -f <other stuff> on your db host.
Previous Nagios employee
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Manage Users page SQL error
FWIW, the bug report # mentioned in https://support.nagios.com/forum/viewto ... 16&t=34202 is incorrect. It's actually 6270...I'll fix it in the original thread.
Re: Manage Users page SQL error
As you can see, we identified this quite sometime ago. Would be wonderful if it gets resolved ASAP.dwhitfield wrote:FWIW, the bug report # mentioned in https://support.nagios.com/forum/viewto ... 16&t=34202 is incorrect. It's actually 6270...I'll fix it in the original thread.
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
Nagios Fusion 2024R1.0.2
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Manage Users page SQL error
Feature Requests are prioritized internally by the development team. If you want a higher priority, custom development is available for a fee. Please contact [email protected] if you are interested.
Previous Nagios employee
Re: Manage Users page SQL error
This isn't a feature request. Your official Nagios documentation outlines remote Database support, but your recommendation (repair_databases.sh) still fails to take this into account. If your script accepted parameters, this would be a more viable support solution.avandemore wrote:Feature Requests are prioritized internally by the development team. If you want a higher priority, custom development is available for a fee. Please contact [email protected] if you are interested.
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
Nagios Fusion 2024R1.0.2
Re: Manage Users page SQL error
Following this thread I did a few things. First off, I spoke with our developers about this, and they do agree that the script can be updated for supporting offloaded databases. Since the current script uses local files to repair them, this would require re-writing it though. I have brought the feature request back to their attention though so it should be addressed in a future feature release.
Secondly, @avandemore has filed something a request internally here for our documentation to be updated, to take the offloaded DB's into account so that this information is readily available.
On a side note, you should be able to run the following commands from the local machine, against the offloaded db (adjust as needed) -
Secondly, @avandemore has filed something a request internally here for our documentation to be updated, to take the offloaded DB's into account so that this information is readily available.
On a side note, you should be able to run the following commands from the local machine, against the offloaded db (adjust as needed) -
Code: Select all
mysqlcheck -f -r -u nagiosxi -pnagios --databases nagiosxi -h xxx.xxx.xxx.xxx
mysqlcheck -f -r -u nagios -pnagios --databases nagios -h xxx.xxx.xxx.xxx
mysqlcheck -f -r -u nagiosql -pnagios --databases nagiosql -h xxx.xxx.xxx.xxx
Former Nagios Employee
Re: Manage Users page SQL error
Thank you for the informative post. We will try the suggestion and report back.rkennedy wrote:Following this thread I did a few things. First off, I spoke with our developers about this, and they do agree that the script can be updated for supporting offloaded databases. Since the current script uses local files to repair them, this would require re-writing it though. I have brought the feature request back to their attention though so it should be addressed in a future feature release.
Secondly, @avandemore has filed something a request internally here for our documentation to be updated, to take the offloaded DB's into account so that this information is readily available.
On a side note, you should be able to run the following commands from the local machine, against the offloaded db (adjust as needed) -Code: Select all
mysqlcheck -f -r -u nagiosxi -pnagios --databases nagiosxi -h xxx.xxx.xxx.xxx mysqlcheck -f -r -u nagios -pnagios --databases nagios -h xxx.xxx.xxx.xxx mysqlcheck -f -r -u nagiosql -pnagios --databases nagiosql -h xxx.xxx.xxx.xxx
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
Nagios Fusion 2024R1.0.2