Hi,
UTF8 and IDO is like … meh.
Test
I’ve just tested this here with 2.11.0-rc1, which works without problems.
object Host "äöü" {
check_command = "dummy"
display_name = "üöä"
}
object User "öüä" {
display_name = "üäö"
}
$ mysql -V
mysql Ver 15.1 Distrib 10.4.6-MariaDB, for osx10.14 (x86_64) using readline 5.1
$ mysql icinga -e "show variables like '%character%';"
+--------------------------+--------------------------------------------------------+
| Variable_name | Value |
+--------------------------+--------------------------------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8mb4 |
| character_set_system | utf8 |
| character_sets_dir | /usr/local/Cellar/mariadb/10.4.6/share/mysql/charsets/ |
+--------------------------+--------------------------------------------------------+
$ cat /usr/local/icinga/icinga2/etc/icinga2/features-enabled/ido-mysql.conf
/**
* The IdoMysqlConnection type implements MySQL support
* for DB IDO.
*/
object IdoMysqlConnection "ido-mysql" {
//user = "icinga"
//password = "icinga"
//host = "localhost"
//database = "icinga"
}
$ cat /usr/local/icinga/icingaweb2/etc/resources.ini
[icingaweb_db]
type = "db"
db = "mysql"
host = "localhost"
port = ""
dbname = "icingaweb2"
username = "icingaweb2"
password = "icingaweb2"
charset = ""
use_ssl = "0"
[icinga_ido]
type = "db"
db = "mysql"
host = "localhost"
port = ""
dbname = "icinga"
username = "icinga"
password = "icinga"
charset = ""
use_ssl = "0"
Questions
Which Icinga 2 version are you using: icinga2 --version
Also, which schema version is involed: mysql icinga -e 'select * from icinga_dbversion;'
The client settings and its character set might be interesting as well.
Please also post your findings as text with enclosed 3 backticks rather than screenshots. Then we can copy-paste stuff instead of typing this again.
One last shot - we’ve replaced our UTF8 validation and escaping library with 2.11, this may have an influence here as well. https://github.com/Icinga/icinga2/pull/7014
Cheers,
Michael

