Icingacli PHP 8.2 deprcated

Hi all,

I am new here and up to that point I could always fix any issues by looking for hints in here. But now I am stuck myself.

Short overview:

  • OS: Debian 12 Bookworm
  • Icinga2: r2.14.0-1
  • Icingaweb2: 2.11.4-2
  • PHP: 8.2.7

A couple days ago I noticed that the Web UI showed some issues with the monitoring backend. I tried installing it again, didn’t work, so I dug deeper. I noticed that I had the statusdata feature enabled which became depracated. I disabled that feature and the icinga2 service is running again.

Only problem since I removed the monitoring-plugins and icingaweb2-module-monitoring beforehand, I reinstalled them and tried to enable the feature using

icingacli module enable monitoring

If I try this I get a lot of php errors like

PHP Deprecated: Creation of dynamic property Icinga\Clicommands\ModuleCommand::$trace is deprecated in /usr/share/php/Icinga/Cli/Command.php on line 61
Deprecated: Creation of dynamic property Icinga\Clicommands\ModuleCommand::$trace is deprecated in /usr/share/php/Icinga/Cli/Command.php on line 61
ERROR: Icinga\Exception\ConfigurationError in /usr/share/php/Icinga/Application/Modules/Manager.php:253 with message: Cannot enable module “monitoring”. Module is not installed.

So now I am stuck here. How can I enable the monitoring again? Here are the packages I am currently running:

iicinga-director 1.10.2-1+debian11
icinga-director-daemon 1.10.2-1+debian11
icinga-director-php 1.10.2-1+debian11
icinga-director-web 1.10.2-1+debian11
icinga-php-common 1.0.0-1.buster
icinga-php-incubator 0.20.0-1+debian11
icinga-php-library 0.12.0-1+debian11
icinga-php-thirdparty 0.11.0-2.buster
icinga2 2.14.0-1+debian12
icinga2-bin 2.14.0-1+debian12
icinga2-common 2.14.0-1+debian12
icinga2-doc 2.14.0-1+debian12
icinga2-ido-mysql 2.14.0-1+debian12
icingacli 2.11.4-2
icingaweb2 2.11.4-2
icingaweb2-common 2.11.4-2
icingaweb2-module-doc 2.11.4-2
icingaweb2-module-monitoring 2.11.4-5+debian11
php-icinga 2.11.4-2

Am I missing something? Do you need further information on this?

Whats the content of /usr/share/icingaweb2/modules/monitoring ?

Here is the content of the directory:

drwxr-xr-x  6 root root  4096 11. Aug 15:45 .
drwxr-xr-x 13 root root  4096 11. Aug 15:45 ..
drwxr-xr-x  6 root root  4096 11. Aug 15:45 application
-rw-r--r--  1 root root 14398 26. Jan 2023  configuration.php
drwxr-xr-x  3 root root  4096 11. Aug 15:45 doc
drwxr-xr-x  3 root root  4096 11. Aug 15:45 library
-rw-r--r--  1 root root   230 26. Jan 2023  module.info
drwxr-xr-x  4 root root  4096 11. Aug 15:45 public
-rw-r--r--  1 root root   226 26. Jan 2023  run.php

But I already solved the issue. Well, I don’t know if that was the only solution but what I noticed was the difference in the package versions between everything related to icingaweb2 and icingaweb2-module-monitoring. So I looked up my repos (default Debian Bookworm and the Debian repo from the Icinga team) and noticed that all icingaweb2 packages except the monitoring packages are newer in the default Debian repos than they are in the Icinga repo. Monitoing on the other hand was not but version 2.11.4-2 was the newest version in Debian’s default repos. So I pinned all icingaweb2 packages to the default repos and when I ran apt update && apt upgrade I got version 2.11.4-2 of the monitoring module and everything worked again.

As I said I don’t know if there might be another solution since it’s a bit confusing that there are newer packages in Debian’s repos than there are in the Icinga repo and those might not get along very well. But for the moment everything seems to work again and I might extend my apt pinning to all Icinga packages except of course those that are only available from the Icinga repo. Since I don’t necessarily need new feature that often maybe that could prevent mixing up some versions.