Hello,
We migrated our Postgres db on our production Nagios XI server to Mysql today, following this procedure https://support.nagios.com/kb/pdf-560.html and just noticed all our quick actions are missing..
We have taken a clone of the server before the migration, but as there have been several changes since the migration, we would really like to find a way to retrieve the quick actions from the Postgres db.
Please suggest how to query the quick actions from the Postgres db?
Grtz
Willem
Postgres to Mysql migration => Missing quick actions
Re: Postgres to Mysql migration => Missing quick actions
The xi_options table can get messed up with the "--format p" option sometimes. Run through the following to export and import the table without this option:
service nagios stop
pg_dump --no-acl --no-owner --data-only -U nagiosxi nagiosxi -t xi_options > nagiosxi_options.psql
php pg2mysql_cli.php nagiosxi_options.psql nagiosxi_options.mysql myisam
echo "TRUNCATE table xi_options;" | mysql -uroot -pnagiosxi -Dnagiosxi
mysql -uroot -pnagiosxi nagiosxi --max_allowed_packet=512M --force < nagiosxi_options.mysql
service nagios start
service nagios stop
pg_dump --no-acl --no-owner --data-only -U nagiosxi nagiosxi -t xi_options > nagiosxi_options.psql
php pg2mysql_cli.php nagiosxi_options.psql nagiosxi_options.mysql myisam
echo "TRUNCATE table xi_options;" | mysql -uroot -pnagiosxi -Dnagiosxi
mysql -uroot -pnagiosxi nagiosxi --max_allowed_packet=512M --force < nagiosxi_options.mysql
service nagios start
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Postgres to Mysql migration => Missing quick actions
Thanks a lot, we will test this first thing tomorrow morning. 
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Postgres to Mysql migration => Missing quick actions
Hi,
I'm Peter, colleague of Willem, also investigation this.
We temporary added 4 quick actions.
But when trying the procedure above, we again ended up with an empty quick actions list and also quick actions where disabled.
We even lost our license information
Luckily we had a snapshot to revert to, so that was "quickly" solved.
But still an empty quick actions list.
The tip about actions being in the xi_options table was very useful. So I thought, let's try another approach:
- created a backup table in postgresql with the 'actions_component_options' row (it seems that all actions are in 1 row).
- pg_dump that table
- import into mysql in another table besides xi_options
- update that 1 row in the mysql xi_options table with the UPDATE statement.
The new information is available in the correct row in the xi_options table.
But no luck => the list was empty again and disabled.
Some thoughts:
When I tried it again by just creating a default "Search for host on Google" action, I saw in the table that every action ends with somekind of UID.
So, maybe those are save/linked somewhere else in the table or database?
I'm Peter, colleague of Willem, also investigation this.
We temporary added 4 quick actions.
But when trying the procedure above, we again ended up with an empty quick actions list and also quick actions where disabled.
We even lost our license information
Luckily we had a snapshot to revert to, so that was "quickly" solved.
But still an empty quick actions list.
The tip about actions being in the xi_options table was very useful. So I thought, let's try another approach:
- created a backup table in postgresql with the 'actions_component_options' row (it seems that all actions are in 1 row).
- pg_dump that table
- import into mysql in another table besides xi_options
- update that 1 row in the mysql xi_options table with the UPDATE statement.
The new information is available in the correct row in the xi_options table.
But no luck => the list was empty again and disabled.
Some thoughts:
When I tried it again by just creating a default "Search for host on Google" action, I saw in the table that every action ends with somekind of UID.
So, maybe those are save/linked somewhere else in the table or database?
Re: Postgres to Mysql migration => Missing quick actions
We found an issue with the actions component and supplied it to @WillemDH to test. It can also be downloaded/installed under Admin > System Extentions.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.