We have Nagios xi 2014R2.7 on RHEL6, and we also have Nagios xi 5.2.3 on RHEL6 and Nagios xi 5.4.8 on RHEL7.
On Nagios xi 2014R2.7, both MySQL and Postgres are used. We can run the command "echo 'select * from xi_auditlog;' | psql nagiosxi nagiosxi" to get the audit logs in the table "xi_auditlog".
On Nagios xi 5.2.3 and Nagios xi 5.4.8, MySQL is used but Postgres is not used. What is the equivalent command that can be used to get the audit logs in the table "xi_auditlog"?
Command line to get audit logs from xi_auditlog
-
- Posts: 172
- Joined: Mon Jan 19, 2015 6:01 pm
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Command line to get audit logs from xi_auditlog
Hi
The table structre is the same, but connection commands will change from postgress to mysql.
Let us know if you need further assistance with the query.
Also, RHEL 6 is EOL and not supported at this time. I would recommend planning a migration for those systems. The Nagios xi license policy does allow for 3 separate activations (production, test and backup) to help make this a smooth transition.
Reference:
Migrating Nagios xi to a different Server
Regards,
Benjamin
The table structre is the same, but connection commands will change from postgress to mysql.
Code: Select all
echo "select * from xi_auditlog;" | mysql -h 127.0.0.1 -uroot -pnagiosxi nagiosxi
Also, RHEL 6 is EOL and not supported at this time. I would recommend planning a migration for those systems. The Nagios xi license policy does allow for 3 separate activations (production, test and backup) to help make this a smooth transition.
Reference:
Migrating Nagios xi to a different Server
Regards,
Benjamin
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 172
- Joined: Mon Jan 19, 2015 6:01 pm
Re: Command line to get audit logs from xi_auditlog
@Benjamin, thanks for the quick response.
I tried the command that you provided, and received an access denied error:
$ echo "select * from xi_auditlog;" | mysql -h 127.0.0.1 -uroot -pnagiosxi nagiosxi
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Any suggestion to resolve this issue?
I tried the command that you provided, and received an access denied error:
$ echo "select * from xi_auditlog;" | mysql -h 127.0.0.1 -uroot -pnagiosxi nagiosxi
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Any suggestion to resolve this issue?
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Command line to get audit logs from xi_auditlog
Hi,
It looks like the default database passwords were changed on this system. You can retrieve this information by inspecting the following file.
For more details, we have a useful guide with detailed instructions on changing the default passwords, take a look on page 3 for the database settings.
Nagios xi How to Change Default Passwords
If that's not it, try logging in directly and then running the query.
Let us know if you get it resolved.
It looks like the default database passwords were changed on this system. You can retrieve this information by inspecting the following file.
Code: Select all
cat /usr/local/nagiosxi/html/config.inc.php
Nagios xi How to Change Default Passwords
If that's not it, try logging in directly and then running the query.
Code: Select all
mysql -u root -p
use nagiosxi;
select * from xi_auditlog;
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 172
- Joined: Mon Jan 19, 2015 6:01 pm
Re: Command line to get audit logs from xi_auditlog
Yes, the default database password was changed during the Nagios xi installation on this system. I found the password, and all looks fine. Thanks!
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Command line to get audit logs from xi_auditlog
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!