Current state of icinga notifications modules

Hi all,
I know it’s early access, but since the packages are already being distributed via the official repositories, I wanted to take a look at the new notification modules. Unfortunately, I can’t get them to work.

  • The daemon is installed and running.
  • The database is present and registered as a resource.
  • The source is configured.

However, I run into issues with the channels. When I try to create one, I get an “undefined index: config” error, regardless of which type I select.

In the Notifications tab under Events, I get the following SQLSTATE error:
syntax error or access violation: 1305 FUNCTION notifications.json_objectagg does not exist

The installation is on RHEL 8, with the following versions:

  • icingaweb2: 2.12.2
  • icinga-notifications: 0.1.1
  • icinga-notifications-web: 0.1.0
  • icingadb: 1.2.1
  • icingadbweb: 1.1.3

Has anyone encountered similar issues or has any tips on how to resolve this? Any help or information would be greatly appreciated!

Cheers,
Marcus

Thanks for trying out Icinga Notifications and reporting back.

Which database server are you using and in which version?

We are currently running on MariaDB 10.3.39

Sorry, but it seems like your MariaDB version is too old. Seems like JSON_OBJECTAGG was added first in MariaDB 10.5.0, https://mariadb.com/kb/en/json_objectagg/.

Thanks for the hint, @apenning. This should be documented in the docs, as MariaDB 10.3 is the default version in RHEL 8 and 10.5 in RHEL 9.

The SQL errors have disappeared. However, I still cannot create a channel. On the ‘Add Channel’ screen, I get a red message saying ‘Undefined index: config’ above the Name field when I click the ‘Add Channel’ button, regardless of which type I choose

Thanks again for your report, I have opened up a PR fixing the required version in the docs, https://github.com/Icinga/icinga-notifications/pull/287.

Please note that with Icinga Notifications being a new project, even still being in its “beta” phase, we are targeting current operating system versions. RHEL 8’s full support has already ended last year, not being our main priority for Icinga Notifications, https://endoflife.date/rhel.

I am sorry hearing this. What did you change? Have you upgraded your SQL server? Could you please again supply all your component’s versions, including database and PHP. Are there any logs available?

Maintanance and extended support is still in the lifecycle :wink:
Anyway, I have updated MariaDB to 10.5.27 via RedHat module upgrade mechanism.
Packages currently installed ( plus their associated packages which I am not listing now for reasons of clarity):

  • icinga2-2.14.5
  • icinga-businessprocess-2.5.1
  • icinga-cube-1.3.3
  • icingadb-1.2.1
  • icingadb-redis-7.2.7
  • icingadb-web-1.1.3
  • icinga-notifications-0.1.0
  • icingaweb2-2.12.2
  • php-icinga2-2.12.2

php --version: 7.2.24

I couldn’t find any helpful logs

Since I am not so familiar with the web side, I have created an issue based on this thread in their issue tracker, https://github.com/Icinga/icinga-notifications-web/issues/307. Please feel free to add any more information you have that is not already part of this thread.

1 Like

Please also tell us:

  • The browser used
  • The version of icinga-php-library and icinga-php-thirdparty

Hi Johannes,
Browser is Firefox.
icinga-php-thirdparty is 0.12.1
icinga-php-library is 0.14.2

I cannot reproduce this. Neither with Chrome nor with Firefox.

Is there anything in the browser log once you’re submitting the form? (F12, Console)

While you have this already open, please try to identify the HTTP POST request made in the Network section, and show the request body. (Redact the CSRF token and secrets of course)

As we are installing the notifications modules via packages, we are on the tag v0.1.0. It seems the problem occurs in line 202 of ChannelForm.php icinga-notifications-web/application/forms/ChannelForm.php at v0.1.0 · Icinga/icinga-notifications-web · GitHub :

$channel['config'] = json_encode($this->filterConfig($channel['config']));

In our setup. $channel is defined, but the key “config” is missing. An vardump of $channel shows only the key name and type, but no “config” key:

array(2) { ["name"]=> string(4) "test" ["type"]=> string(5) "email" }

EDIT: We further debugged the error and found the following:
When you forget to set the “character Set” to “utf8” in the Applications-> Ressources → notifications Database settings, the error occurs. This necessery setting is not documented in the documentation :slight_smile: This error is resolved