First off, I want to thank everyone on this thread for thier assistance! You folks have really been a huge help as a I familiarize myself with the inner workings of Icinga and try to modernize my installation and migrate the data to Postgres.
I am happy to report that I have migrated my current IDO MariaDB configuration to a Postgres IcingaDB deployment. Once I read (and worked through) the documentation it really was pretty straight forward. I did not migrate history (I tried, but the icingadb-migrate
command would just hang on “connecting to databases” even though i verified the configuration for source and tagret were correct. I did not see any command line optoons to get additional information out of icingadb-migrate
and there was never a cache file created – so i just gave up. Really, i never looked at the history anyway.
Below are my notes which may help someone else in the future:
Migrating from MariaDB Icinga IDO to Postgres IcingaDB
Validate that you either have Redis installed or install the Icingadb-redis
package. In my case, I already had Redis installed and also the Icingadb-redis. There was no need for both, so I did a
sudo apt-get purge icingadb-redisThe
icinadb-redis` package uses a custom port (6380) for Redis, so I had to make sure that my installation configuration was adjusted accordingly to use the default Redis port of 6379.
Next, see if icingadb feature is enabled:
icinga2 feature list
In my case, it was not so I did a:
sudo icinga2 feature enable icingadb
sudo systemctl restart icinga2
I then followed these steps to setup and configure Icinga on Debian.
After enabling the icingadb feature, I had to go into the Icinga 2 Web interface, click on the Settings sprocket and select icingadb and the refresh its enabled status to turn it on.
Within the Icinga 2 Web Interface, I configured a resource for IcingaDB as follows:
I thine configured the IcingaDB module
I made sure to adjust my Redis port to 6379 accordingly.
And then… poof! everything just appeared in the web interfaxce!
Note: There may have been a service restart here; i can’t remember.
After poking around and validating that everything looked good I decided it was time to bid farwell to IDO. I performed the following cleanup steps:
sudo icinga2 feature disable ido-mysql
sudo systemctl stop icinga2
sudo apt-get purge icinga2-ido-mysql
Then finally, in Incinga Web, I went to go to Application and Resources and deleted the Icinga IDO resource.