I am getting an error when I run the following command
php /usr/local/nagiosxi/cron/dbmaint.php Error is below. How and where do I add the IDs this would need to complete? Can i just add them to a password file or will they need some kind of rights to the database itself?
Cron job file that shows the reference
Need assistance with adding in passwords for dbmaint
Need assistance with adding in passwords for dbmaint
You do not have the required permissions to view the files attached to this post.
-
- Posts: 123
- Joined: Wed Aug 23, 2023 11:29 am
Re: Need assistance with adding in passwords for dbmaint
Hi @Psihawk,
These are defined in /usr/local/nagiosxi/html/config.inc.php. I am not sure why dbmaint.php would not be able to access them, but hopefully this will help you figure it out on your side. Does running the script give you anything other than these two notices?
Please let us know what you find.
Thank you!
These are defined in /usr/local/nagiosxi/html/config.inc.php. I am not sure why dbmaint.php would not be able to access them, but hopefully this will help you figure it out on your side. Does running the script give you anything other than these two notices?
Please let us know what you find.
Thank you!
Re: Need assistance with adding in passwords for dbmaint
Yes the script fails. Also in the file you mentioned there is no section for DBMaint
You do not have the required permissions to view the files attached to this post.
Re: Need assistance with adding in passwords for dbmaint
Re: Need assistance with adding in passwords for dbmaint
This occurred right after the latest update we moved to
2024R1.0.1
DBMaintenance hasnt been green since. I looks like we are missing the entries for what is explained here from the other ticket
"In MySQL, there should be an additional user named dbmaint_nagiosxi, and the nagiosxi user should no longer be able to modify/delete records from the xi_auditlog table. In /usr/local/nagiosxi/html/config.inc.php, there should be a db_info entry for nagiosxi with entries for dbmaint_user and dbmaint_pwd."
I am curious of those can be added back in if someone gives the the format of what is needed? Or do I have to run something against the DB to even allow that to work?
2024R1.0.1
DBMaintenance hasnt been green since. I looks like we are missing the entries for what is explained here from the other ticket
"In MySQL, there should be an additional user named dbmaint_nagiosxi, and the nagiosxi user should no longer be able to modify/delete records from the xi_auditlog table. In /usr/local/nagiosxi/html/config.inc.php, there should be a db_info entry for nagiosxi with entries for dbmaint_user and dbmaint_pwd."
I am curious of those can be added back in if someone gives the the format of what is needed? Or do I have to run something against the DB to even allow that to work?
-
- Posts: 123
- Joined: Wed Aug 23, 2023 11:29 am
Re: Need assistance with adding in passwords for dbmaint
Hi @Psihawk,
Try the following:
Edit the /usr/local/nagiosxi/html/config.inc.php file and change this section from
to
The xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx is the dbmaintpass= option from the /usr/local/nagiosxi/etc/xi-sys.cfg file
Save the change and restart crond
Let us know if this works.
Thank you!
Try the following:
Edit the /usr/local/nagiosxi/html/config.inc.php file and change this section from
Code: Select all
$cfg['db_info'] = array(
"nagiosxi" => array(
"dbtype" => 'mysql',
"dbserver" => '',
"user" => 'nagiosxi',
to
Code: Select all
$cfg['db_info'] = array(
"nagiosxi" => array(
"dbmaint_user" => 'dbmaint_nagiosxi',
"dbmaint_pwd" => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
"dbtype" => 'mysql',
"dbserver" => '',
"user" => 'nagiosxi',
The xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx is the dbmaintpass= option from the /usr/local/nagiosxi/etc/xi-sys.cfg file
Save the change and restart crond
Code: Select all
systemctl restart crond
Thank you!
Re: Need assistance with adding in passwords for dbmaint
There is no dbmaintpass in the file /usr/local/nagiosxi/etc/xi-sys.cfg file
it goes from chownbin ='xxxxx'
to
groupaddbin='xxxxxx'
it goes from chownbin ='xxxxx'
to
groupaddbin='xxxxxx'
-
- Posts: 123
- Joined: Wed Aug 23, 2023 11:29 am
Re: Need assistance with adding in passwords for dbmaint
Hi @Psihawk,
One last place to check. See if there is an entry for dbmaint in /usr/local/nagiosxi/var/xi-sys.cfg. If not, I definitely recommend opening a case on the Answer Hub, because it is most likely that something failed during upgrade.
Thank you!
One last place to check. See if there is an entry for dbmaint in /usr/local/nagiosxi/var/xi-sys.cfg. If not, I definitely recommend opening a case on the Answer Hub, because it is most likely that something failed during upgrade.
Thank you!