Umlauts and special characters in icingaweb2

Hi all.

I’m having trouble displaying umlauts and special characts (such as °) in icingaweb2.
I encounter this problem time and time again.

I already found out that Ubuntu 20.04+mariadb will use utf8mb4 as default when creating a database.
So I dropped both icinga2 and icingaweb2 databases, as it it as fresh setup with nearly nothing in it.
Then I recreated the databases with the following commands:

create database icinga2 CHARACTER SET latin1 COLLATE latin1_swedish_ci;
create database icingaweb2 CHARACTER SET latin1 COLLATE latin1_swedish_ci;

Both databases now have latin1 as default character set:

SELECT default_character_set_name FROM information_schema.SCHEMATA  WHERE schema_name = "icinga2";
+----------------------------+
| default_character_set_name |
+----------------------------+
| latin1                     |
+----------------------------+
1 row in set (0.000 sec)

SELECT default_character_set_name FROM information_schema.SCHEMATA  WHERE schema_name = "icingaweb2";
+----------------------------+
| default_character_set_name |
+----------------------------+
| latin1                     |
+----------------------------+
1 row in set (0.000 sec)

Even so I have done that and set the charset option of the resources to latin1, I still get BS in the webinterface :frowning:
image
image
(upper comment is °, lower is an umlaut)

In the database all is displayed correctly:


image

Anyone got any idea where to look next?

We have the same problem. Because we know this our “workarround” is to write ae instead of ä etc.

But I had an idea after you wrote schema “latin1” and did following steps:

  1. I did an acknowledgement with umlauts. But in our database it is, unlike your tests, also like displyed:
    image
  2. I looked into php.ini and here is set the default char “UTF-8”. I set this also to latin1 like the database is set to. After I the restart of php-fpm we got this error in icingaweb2:
    . My PHP skills are not very good, but what I can read in the description of the function “htmlspecialchars”(https://www.php.net/manual/de/function.htmlspecialchars.php) it looks like latin1 is not supported.

Maybe a problem of the used charset with the database schema with the supported special characters?

Because I tested the umlauts also in the director. Here is everyhting fine:

.

And here is the big diffrence: The default charset from the director database is utf8!

I found two issues talking about the charset and icingaweb2:


In both it is said to “simply” set the charset of the ido resource to “latin1”, which I have done.
Also the first one (talking about the PR) is stating that it is bascially irrelevant what charset the DB itself has, as long as the IDO resource has “latin1” set as the charset. At least that’s what I understand from all the posts.

@nilmerg
Could you please share your thoughts on why the umlauts and special characters are still not correctly displayed, even though I have the “latin1” as the default charset of the resource config and the database itself?

I set the charset at the ressources from icingaweb and icinga to latin1. And it works!
image

For me it is a little bit incomprehensible why the director demands utf8 and icinga (web) latin1.

And as you wrote in the issue this hint should be written in the docs!

Okay, Umlauts again :roll_eyes: :crazy_face:

The character encoding is relevant as follows:

Icinga Web (UTF-8) << MySQL (latin1) << Icinga (UTF-8)

Icinga writes its data correctly into the database. The database accepts it then as latin1, though byte-wise it’s still UTF-8. If interpreted as such, as it’s then done by Icinga Web.

I know, it sounds strange at first, but think of latin1 as a 1:1 representation of Icinga’s data (raw bytes). The real encoding doesn’t matter at all, it’s all up to the reader to interpret it correctly.

The IDO schema defines a hardcoded encoding/collation in various places since, well, forever. That’s latin1/latin1_general_cs. The default encoding/collation of the database shouldn’t matter, because the schema defines them explicitly.

The same is done by Icinga Web in its queries. That’s the reason why it is necessary to define latin1 as charset in the IDO’s resource. Only this way Icinga Web fetches the data in said 1:1 representation and can then interpret it as UTF-8.

Yes it’s weird. That’s usually the case with bad decisions made in the past and the necessity to be compatible with legacy installations. Recent products all make use of UTF-8 throughout the entire chain without such hacks/workarounds. (Director, Icinga DB, …)

So, that’s all for now regarding an explanation on how/why it works. I can only guess what the problem might be, but I’ll only repeat what works for me:

  • MySQL 8 (Basic installation, the official docker image)
  • IDO schema import, without any changes or adjusted defaults
  • latin1 as charset in the IDO’s resource configuration in Icinga Web 2

The last step is obsolete with v2.9, as then latin1 is the charset used by default for the IDO resource. (You’ve already linked the PR)

If this doesn’t work for you, make out any differences which may affect the processing that I described above. I hope this helps.

2 Likes

Thanks for your answer, much appreciated!

So what I am taking away from this is:

  • it doesn’t matter what the encoding was when the DB was created, as long as I put “latin1” in the IDO resource config

The only difference, as fas as I can see, is that I am using a different MySQL/MariaDB version.

Im installing via Ansible atm (to learn it :slight_smile: )
The db parts

- name: Create a new database with name 'icinga'
  mysql_db:
    name: icinga2
    state: present
    login_user: 'root'
    login_password: "{{ mysql_root_password }}"


- name: Create icinga mysql user
  mysql_user:
    login_user: 'root'
    login_password: "{{ mysql_root_password }}"
    name: icinga2
    password: "{{ icinga_user_password  }}"
    host: "{{ item }}"
    priv: "icinga2.*:SELECT,INSERT,UPDATE,DELETE,DROP,CREATE,VIEW,INDEX,EXECUTE"
    state: present
  loop:
    - 127.0.0.1
    - ::1
    - localhost

- name: Import /usr/share/icinga2-ido-mysql/schema/mysql.sql
  mysql_db:
    login_user: 'root'
    login_password: "{{ mysql_root_password }}"
    state: import
    name: icinga2
    target: /usr/share/icinga2-ido-mysql/schema/mysql.sql

Anything under /usr/share/icinga2-ido-mysql/schema/upgrade/ is only needed when upgrading from a lower version and not when doing a new installation, correct?

Even though I think I am doing everything correctly the umlauts and special characters are still not displayed correctly. As said in my first post I even dropped the databases from the ansible install and re-did that by hand on the cli, still without success.

Yes.

How is the text with the umlauts and special chars transmitted to Icinga 2?
Could you please show an example text right from the database?

Sure.

MariaDB [icinga2]> select * from icinga_servicestatus;
+------------------+-------------+-------------------+---------------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| servicestatus_id | instance_id | service_object_id | status_update_time  | output                                                              | long_output                                                                                                                                                                                                                                
+------------------+-------------+-------------------+---------------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
...
|               29 |           1 |               283 | 2021-01-11 15:07:48 | [OK]: Temp sensor CPU1 Temp status is: OK (48.0 °C) (max: 100.0 °C) | [OK]: Temp sensor CPU2 Temp status is: OK (52.0 °C) (max: 100.0 °C)\n[OK]: Temp sensor System Board Inlet Temp status is: OK (22.0 °C) (max: 47.0 °C)\n[OK]: Temp sensor System Board Exhaust Temp status is: OK (40.0 °C) (max: 80.0 °C)  
...
+------------------+-------------+-------------------+---------------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Here is how the checks are looking in the webinterface:
image

Another example is in the opening post.

Hm, okay, please select HEX(output), HEX(long_output), maybe it’s a different encoding than UTF-8 :thinking:

Like this :sweat_smile:?

MariaDB [icinga2]> select * from icinga_servicestatus where servicestatus_id = '29';
+------------------+-------------+-------------------+---------------------+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--------------+---------------+------------------+---------------------+-----------------------+--------------------+---------------------+---------------------+------------+---------------------+------------------------+-----------------+---------------------+-------------------+---------------------+--------------------+------------+-------------------+-------------------+-----------------------+-----------------------+-------------------------------+----------------------+-----------------------------+------------------------+-----------------------+-----------------------+------------------------+-------------+----------------------+----------+----------------+--------------------------+----------------------------+--------------------------+---------------------+-----------------------------+---------------------+---------------+---------------+-----------------------+----------------------+----------------------------+--------------+--------------------+
| servicestatus_id | instance_id | service_object_id | status_update_time  | output                                                                | long_output                                                                                                                                                                                                                                     | perfdata                                                                                                                            | check_source | current_state | has_been_checked | should_be_scheduled | current_check_attempt | max_check_attempts | last_check          | next_check          | check_type | last_state_change   | last_hard_state_change | last_hard_state | last_time_ok        | last_time_warning | last_time_unknown   | last_time_critical | state_type | last_notification | next_notification | no_more_notifications | notifications_enabled | problem_has_been_acknowledged | acknowledgement_type | current_notification_number | passive_checks_enabled | active_checks_enabled | event_handler_enabled | flap_detection_enabled | is_flapping | percent_state_change | latency  | execution_time | scheduled_downtime_depth | failure_prediction_enabled | process_performance_data | obsess_over_service | modified_service_attributes | original_attributes | event_handler | check_command | normal_check_interval | retry_check_interval | check_timeperiod_object_id | is_reachable | endpoint_object_id |
+------------------+-------------+-------------------+---------------------+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--------------+---------------+------------------+---------------------+-----------------------+--------------------+---------------------+---------------------+------------+---------------------+------------------------+-----------------+---------------------+-------------------+---------------------+--------------------+------------+-------------------+-------------------+-----------------------+-----------------------+-------------------------------+----------------------+-----------------------------+------------------------+-----------------------+-----------------------+------------------------+-------------+----------------------+----------+----------------+--------------------------+----------------------------+--------------------------+---------------------+-----------------------------+---------------------+---------------+---------------+-----------------------+----------------------+----------------------------+--------------+--------------------+
|               29 |           1 |               283 | 2021-01-12 14:32:52 | [OK]: Temp sensor CPU1 Temp status is: OK (50.0 °C) (max: 100.0 °C)   | [OK]: Temp sensor CPU2 Temp status is: OK (57.0 °C) (max: 100.0 °C)\n[OK]: Temp sensor System Board Inlet Temp status is: OK (20.0 °C) (max: 47.0 °C)\n[OK]: Temp sensor System Board Exhaust Temp status is: OK (40.0 °C) (max: 80.0 °C)       | temp_CPU1_Temp=50.0;;100 temp_CPU2_Temp=57.0;;100 temp_System_Board_Inlet_Temp=20.0;43;47 temp_System_Board_Exhaust_Temp=40.0;75;80 | icinga       |             0 |                1 |                   1 |                     1 |                  5 | 2021-01-12 14:32:52 | 2021-01-12 14:37:51 |          0 | 2021-01-08 08:13:26 | 2021-01-08 08:13:26    |               0 | 2021-01-12 14:32:52 | NULL              | 2021-01-08 08:12:56 | NULL               |          1 | NULL              | NULL              |                     0 |                     1 |                             0 |                    0 |                           0 |                      1 |                     1 |                     1 |                      0 |           0 |                    0 | 0.000216 |       0.189378 |                        0 |                          0 |                        1 |                   0 |                           0 | null                | NULL          | idrac_health  |                     5 |                    1 |                          0 |            1 |                238 |
+------------------+-------------+-------------------+---------------------+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+--------------+---------------+------------------+---------------------+-----------------------+--------------------+---------------------+---------------------+------------+---------------------+------------------------+-----------------+---------------------+-------------------+---------------------+--------------------+------------+-------------------+-------------------+-----------------------+-----------------------+-------------------------------+----------------------+-----------------------------+------------------------+-----------------------+-----------------------+------------------------+-------------+----------------------+----------+----------------+--------------------------+----------------------------+--------------------------+---------------------+-----------------------------+---------------------+---------------+---------------+-----------------------+----------------------+----------------------------+--------------+--------------------+
1 row in set (0.000 sec)
MariaDB [icinga2]> select HEX(output), HEX(long_output) from icinga_servicestatus where servicestatus_id = '29';
+----------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| HEX(output)                                                                                                                            | HEX(long_output)                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
+----------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 5B4F4B5D3A2054656D702073656E736F7220435055312054656D70207374617475732069733A204F4B202835302E3020B0432920286D61783A203130302E3020B04329 | 5B4F4B5D3A2054656D702073656E736F7220435055322054656D70207374617475732069733A204F4B202835372E3020B0432920286D61783A203130302E3020B043295C6E5B4F4B5D3A2054656D702073656E736F722053797374656D20426F61726420496E6C65742054656D70207374617475732069733A204F4B202832302E3020B0432920286D61783A2034372E3020B043295C6E5B4F4B5D3A2054656D702073656E736F722053797374656D20426F61726420457868617573742054656D70207374617475732069733A204F4B202834302E3020B0432920286D61783A2038302E3020B04329 |
+----------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.000 sec)

Indeed, that’s not UTF-8, but ISO-8859-1. No wonder you don’t see the degree symbol :sweat_smile:

Maybe Icinga 2 just passes through what a plugin outputs without ever decoding it. You could try forcing the plugin to output UTF-8?

The check script is the following: check_redfish.py

This has

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

at the beginning of the script, so I guess this should be UTF-8 output.

I also tried adding a comment with umlauts again:
The database has the following:

MariaDB [icinga2]> select * from icinga_comments where comment_id = '7';
+------------+-------------+---------------------+-----------------+--------------+------------+-----------+---------------------+---------------------+-------------+----------------------+
| comment_id | instance_id | entry_time          | entry_time_usec | comment_type | entry_type | object_id | comment_time        | internal_comment_id | author_name | comment_data         |
+------------+-------------+---------------------+-----------------+--------------+------------+-----------+---------------------+---------------------+-------------+----------------------+
|          7 |           1 | 2021-01-13 17:31:24 |          351253 |            2 |          1 |       455 | 2021-01-13 17:31:24 |                   3 | admin       | test umlaut ö ä ü    |
+------------+-------------+---------------------+-----------------+--------------+------------+-----------+---------------------+---------------------+-------------+----------------------+
1 row in set (0.000 sec)

MariaDB [icinga2]> select HEX(comment_data) from icinga_comments where comment_id = '7';
+------------------------------------+
| HEX(comment_data)                  |
+------------------------------------+
| 7465737420756D6C61757420F620E420FC |
+------------------------------------+
1 row in set (0.000 sec)

Webinterface:
image

The coding comment in the python file’s header is only a hint for the interpreter that the file’s content is encoded with utf-8.

Your comment is encoded with ISO-8859-1 again:

>>> s = bytes.fromhex('7465737420756D6C61757420F620E420FC')
>>> s
b'test umlaut \xf6 \xe4 \xfc'
>>> s.decode('utf-8')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 12: invalid start byte
>>> s.decode('iso-8859-1')
'test umlaut ö ä ü'

The encoding of an application’s output on linux is controlled by the locale if I’m not mistaken. So that should be changeable by adjusting the system’s default locale.

Your comment however should be UTF-8, if added by using the UI. Or did you add it somehow else?

Nope, added it via the webinterface.

$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

$ localectl status
   System Locale: LANG=en_US.UTF-8
       VC Keymap: n/a
      X11 Layout: de
       X11 Model: pc105
     X11 Variant: nodeadkeys

$ locale -a
C
C.UTF-8
de_DE.utf8
en_US.utf8
POSIX

Don’t know where else to look :frowning:

Apache enabled configs/sites
$ cat conf-enabled/charset.conf
# Read the documentation before enabling AddDefaultCharset.
# In general, it is only a good idea if you know that all your files
# have this encoding. It will override any encoding given in the files
# in meta http-equiv or xml encoding tags.

#AddDefaultCharset UTF-8

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

$ cat conf-enabled/icingaweb2.conf
Alias /icingaweb2 "/usr/share/icingaweb2/public"

<Directory "/usr/share/icingaweb2/public">
    Options SymLinksIfOwnerMatch
    AllowOverride None

    SetEnv ICINGAWEB_CONFIGDIR "/etc/icingaweb2"

    EnableSendfile Off

    <IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteBase /icingaweb2/
        RewriteCond %{REQUEST_FILENAME} -s [OR]
        RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^.*$ - [NC,L]
        RewriteRule ^.*$ index.php [NC,L]
    </IfModule>

    <IfModule !mod_rewrite.c>
        DirectoryIndex error_norewrite.html
        ErrorDocument 404 /error_norewrite.html
    </IfModule>
</Directory>


$ cat sites-enabled/000-default.conf
<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

                # Redirect to Subfolder icingaweb2
                RedirectMatch ^/$ /icingaweb2/

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Just a shot in the blue: Could you try creating the database without defining an explicit encoding/collation? Maybe it’s the database that’s doing things with your comments and plugin output.

That’s how the database has been created the first time with the ansible play:

At least I don’t explicitly set anything but the name of the database when running the module and thus assuming it’s just using the mysql default, which is utf8mb4 on Ubuntu 20.04 and MariaDB

So the charsets of your database are those that I’ve shown here?

Currently it looks like this:

MariaDB [(none)]> SELECT default_character_set_name FROM information_schema.SCHEMATA WHERE schema_name = "icinga2";
+----------------------------+
| default_character_set_name |
+----------------------------+
| latin1                     |
+----------------------------+
1 row in set (0.000 sec)

MariaDB [(none)]> SELECT CCSA.character_set_name FROM information_schema.`TABLES` T, information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA WHERE CCSA.collation_name = T.table_collation  AND T.table_schema = "icinga2" AND T.table_name = "icinga_comments";
+--------------------+
| character_set_name |
+--------------------+
| latin1             |
+--------------------+
1 row in set (0.001 sec)

MariaDB [(none)]> SELECT character_set_name FROM information_schema.`COLUMNS`  WHERE table_schema = "icinga2" AND table_name = "icinga_comments"  AND column_name = "comment_data";
+--------------------+
| character_set_name |
+--------------------+
| latin1             |
+--------------------+
1 row in set (0.000 sec)

EDIT:
dropped the icinga2 db again:

MariaDB [(none)]> drop database icinga2;
Query OK, 61 rows affected (0.729 sec)

MariaDB [(none)]> create database icinga2;
Query OK, 1 row affected (0.000 sec)

MariaDB [(none)]> SELECT default_character_set_name FROM information_schema.SCHEMATA WHERE schema_name = "icinga2";
+----------------------------+
| default_character_set_name |
+----------------------------+
| utf8mb4                    |
+----------------------------+
1 row in set (0.000 sec)

MariaDB [(none)]> SELECT CCSA.character_set_name FROM information_schema.`TABLES` T, information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA WHERE CCSA.collation_name = T.table_collation  AND T.table_schema = "icinga2" AND T.table_name = "icinga_comments";
+--------------------+
| character_set_name |
+--------------------+
| utf8mb4            |
+--------------------+
1 row in set (0.001 sec)

MariaDB [(none)]> SELECT character_set_name FROM information_schema.`COLUMNS`  WHERE table_schema = "icinga2" AND table_name = "icinga_comments"  AND column_name = "comment_data";
+--------------------+
| character_set_name |
+--------------------+
| latin1             |
+--------------------+
1 row in set (0.000 sec)

Didn’t change the behavior:

MariaDB [(none)]> select * from icinga2.icinga_comments where comment_id = "4";
+------------+-------------+---------------------+-----------------+--------------+------------+-----------+---------------------+---------------------+-------------+------------------+---------------+----------------+---------+-----------------+---------------------------------------------------------+---------------+--------------------+
| comment_id | instance_id | entry_time          | entry_time_usec | comment_type | entry_type | object_id | comment_time        | internal_comment_id | author_name | comment_data     | is_persistent | comment_source | expires | expiration_time | name                                                    | session_token | endpoint_object_id |
+------------+-------------+---------------------+-----------------+--------------+------------+-----------+---------------------+---------------------+-------------+------------------+---------------+----------------+---------+-----------------+---------------------------------------------------------+---------------+--------------------+
|          4 |           1 | 2021-01-18 08:59:49 |          524895 |            1 |          1 |       415 | 2021-01-18 08:59:49 |                   4 | admin       | test öpäüöä      |             0 |              1 |       0 | NULL            | BCK_iDRAC!sys-info!113e14e4-809a-49ed-82dd-1f1dcc59d797 |    1610956684 |                282 |
+------------+-------------+---------------------+-----------------+--------------+------------+-----------+---------------------+---------------------+-------------+------------------+---------------+----------------+---------+-----------------+---------------------------------------------------------+---------------+--------------------+
1 row in set (0.000 sec)

image

MariaDB [(none)]> select HEX(comment_data) from icinga2.icinga_comments where comment_id = "4";
+------------------------+
| HEX(comment_data)      |
+------------------------+
| 7465737420F670E4FCF6E4 |
+------------------------+
1 row in set (0.000 sec)

image

MariaDB [(none)]> select * from icinga2.icinga_servicestatus where servicestatus_id = '9';
+------------------+-------------+-------------------+---------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+--------------+---------------+------------------+---------------------+-----------------------+--------------------+---------------------+---------------------+------------+---------------------+------------------------+-----------------+---------------------+-------------------+---------------------+---------------------+------------+-------------------+-------------------+-----------------------+-----------------------+-------------------------------+----------------------+-----------------------------+------------------------+-----------------------+-----------------------+------------------------+-------------+----------------------+---------+----------------+--------------------------+----------------------------+--------------------------+---------------------+-----------------------------+---------------------+---------------+---------------+-----------------------+----------------------+----------------------------+--------------+--------------------+
| servicestatus_id | instance_id | service_object_id | status_update_time  | output                                                               | long_output                                                                                                                                                              | perfdata                                                                                                  | check_source | current_state | has_been_checked | should_be_scheduled | current_check_attempt | max_check_attempts | last_check          | next_check          | check_type | last_state_change   | last_hard_state_change | last_hard_state | last_time_ok        | last_time_warning | last_time_unknown   | last_time_critical  | state_type | last_notification | next_notification | no_more_notifications | notifications_enabled | problem_has_been_acknowledged | acknowledgement_type | current_notification_number | passive_checks_enabled | active_checks_enabled | event_handler_enabled | flap_detection_enabled | is_flapping | percent_state_change | latency | execution_time | scheduled_downtime_depth | failure_prediction_enabled | process_performance_data | obsess_over_service | modified_service_attributes | original_attributes | event_handler | check_command | normal_check_interval | retry_check_interval | check_timeperiod_object_id | is_reachable | endpoint_object_id |
+------------------+-------------+-------------------+---------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+--------------+---------------+------------------+---------------------+-----------------------+--------------------+---------------------+---------------------+------------+---------------------+------------------------+-----------------+---------------------+-------------------+---------------------+---------------------+------------+-------------------+-------------------+-----------------------+-----------------------+-------------------------------+----------------------+-----------------------------+------------------------+-----------------------+-----------------------+------------------------+-------------+----------------------+---------+----------------+--------------------------+----------------------------+--------------------------+---------------------+-----------------------------+---------------------+---------------+---------------+-----------------------+----------------------+----------------------------+--------------+--------------------+
|                9 |           1 |               324 | 2021-01-18 09:03:50 | [OK]: Temp sensor CPU1 Temp status is: OK (34.0 °C) (max: 90.0 °C)   | [OK]: Temp sensor System Board Inlet Temp status is: OK (21.0 °C) (max: 42.0 °C)\n[OK]: Temp sensor System Board Exhaust Temp status is: OK (36.0 °C) (max: 80.0 °C)     | temp_CPU1_Temp=34.0;;90 temp_System_Board_Inlet_Temp=21.0;38;42 temp_System_Board_Exhaust_Temp=36.0;75;80 | icinga       |             0 |                1 |                   1 |                     1 |                  5 | 2021-01-18 09:03:50 | 2021-01-18 09:08:48 |          0 | 2021-01-08 08:16:28 | 2021-01-08 08:16:28    |               0 | 2021-01-18 09:03:50 | NULL              | 2021-01-08 08:13:15 | 2021-01-08 08:15:31 |          1 | NULL              | NULL              |                     0 |                     1 |                             0 |                    0 |                           0 |                      1 |                     1 |                     1 |                      0 |           0 |                    0 | 0.09642 |       0.211247 |                        0 |                          0 |                        1 |                   0 |                           0 | null                | NULL          | idrac_health  |                     5 |                    1 |                          0 |            1 |                282 |
+------------------+-------------+-------------------+---------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+--------------+---------------+------------------+---------------------+-----------------------+--------------------+---------------------+---------------------+------------+---------------------+------------------------+-----------------+---------------------+-------------------+---------------------+---------------------+------------+-------------------+-------------------+-----------------------+-----------------------+-------------------------------+----------------------+-----------------------------+------------------------+-----------------------+-----------------------+------------------------+-------------+----------------------+---------+----------------+--------------------------+----------------------------+--------------------------+---------------------+-----------------------------+---------------------+---------------+---------------+-----------------------+----------------------+----------------------------+--------------+--------------------+
1 row in set (0.000 sec)


MariaDB [(none)]> select HEX(output), HEX(long_output) from icinga2.icinga_servicestatus where servicestatus_id = '9';
+--------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| HEX(output)                                                                                                                          | HEX(long_output)                                                                                                                                                                                                                                                                                                                                 |
+--------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 5B4F4B5D3A2054656D702073656E736F7220435055312054656D70207374617475732069733A204F4B202833342E3020B0432920286D61783A2039302E3020B04329 | 5B4F4B5D3A2054656D702073656E736F722053797374656D20426F61726420496E6C65742054656D70207374617475732069733A204F4B202832312E3020C2B0432920286D61783A2034322E3020C2B043295C6E5B4F4B5D3A2054656D702073656E736F722053797374656D20426F61726420457868617573742054656D70207374617475732069733A204F4B202833362E3020C2B0432920286D61783A2038302E3020C2B04329 |
+--------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.000 sec)

Okay, which MariaDB release exactly are you using?

mysql --version
mysql  Ver 15.1 Distrib 10.3.25-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2