Simplified Database Schema Upgrades for Icinga Web and Modules

by | Jul 31, 2024

With the release of Icinga Web 2.12, we’ve streamlined and simplified the process for performing database schema upgrades for both Icinga Web and its modules. This new feature not only indicates when an upgrade is pending but also allows for automatic execution of the upgrade. Previously, users had to consult the upgrade documentation and perform the upgrade manually. While it’s still important to read the upgrade documentation, this new feature simplifies the process significantly.

In Icinga Web, you can navigate to the Migrations section in the System menu. With just one additional click, you can execute pending database upgrades directly from the UI. This view also supports migrating module databases.

Extending or adding functionality in Icinga Web and its modules is achieved through hooks. Hooks act as contracts that define how to extend or provide functionality. Modules implement the actual logic while adhering to the Hooks interfaces. For database upgrades, Icinga Web provides a hook capable of performing these upgrades, though it doesn’t know which specific upgrade to apply for modules. Modules implementing this Hook supply the necessary information. For instance, our Certificate Monitoring and Reporting Modules determine on their own whether an upgrade is needed and which one to apply. The Hook in Icinga Web then collects this information and applies the upgrades in the correct order if multiple upgrades are required. This means your modules can also implement this hook to facilitate simple database upgrades, a topic we will cover in another blog post.

It’s important to note that this feature currently works only for Icinga Web itself and modules that provide a database. Pending Icinga DB upgrades won’t appear here, as the schema is provided by the Icinga DB daemon. However, rest assured that we are working on a feature to simplify this process as well.

You May Also Like…

Subscribe to our Newsletter

A monthly digest of the latest Icinga news, releases, articles and community topics.