Closed icinga-migration closed 9 years ago
Updated by mfrosch on 2015-03-12 15:08:23 +00:00
This is a problem of the Icinga Core, which does not write the UTF-8 code into the database.
It also seems to happen with Icinga2...
Updated by mfrosch on 2015-03-12 15:08:48 +00:00
Updated by mfriedrich on 2015-03-12 16:56:34 +00:00
Updated by mfriedrich on 2015-03-12 19:01:40 +00:00
Updated by mfriedrich on 2015-03-13 12:22:00 +00:00
This issue has been migrated from Redmine: https://dev.icinga.com/issues/7782
Created by leo9641 on 2014-11-21 12:32:34 +00:00
Assignee: (none) Status: Rejected (closed on 2015-03-13 12:22:00 +00:00) Target Version: (none) Last Update: 2015-03-13 12:22:00 +00:00 (in Redmine)
Hi!
I installed icinga-1.11.7 and enable idomod. Created a database icinga in UTF8 :
`comment_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`instance_id` bigint(20) unsigned DEFAULT '0',
`entry_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`entry_time_usec` int(11) DEFAULT '0',
`comment_type` smallint(6) DEFAULT '0',
`entry_type` smallint(6) DEFAULT '0',
`object_id` bigint(20) unsigned DEFAULT '0',
`comment_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`internal_comment_id` bigint(20) unsigned DEFAULT '0',
`author_name` varchar(64) DEFAULT '',
`comment_data` text,
`is_persistent` smallint(6) DEFAULT '0',
`comment_source` smallint(6) DEFAULT '0',
`expires` smallint(6) DEFAULT '0',
`expiration_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`endpoint_object_id` bigint(20) DEFAULT NULL,
PRIMARY KEY (`comment_id`),
UNIQUE KEY `instance_id` (`instance_id`,`object_id`,`comment_time`,`internal_comment_id`),
KEY `comments_i_id_idx` (`instance_id`)
) ENGINE=InnoDB AUTO_INCREMENT=666 DEFAULT CHARSET=utf8 COMMENT='Usercomments on Icinga objects'
Then I installed icinga-web-1.12.0 and I found that COMMENT_DATA (and COMMENT_AUTHOR_NAME too) aren't display in UTF8.
Request for example: /icinga-web/modules/web/simpleDataProvider/json?src_id=comments&filter
{result Admin",COMMENT_TIME 11:27:18",COMMENT_DATA "},{COMMENT_AUTHOR_NAME 14:22:09",COMMENT_DATA???"} ...skip...
I enable sql log and see: 641 Query SET NAMES utf8 641 Query SET NAMES 'utf8'
Thats ok. Then I executed inquiry from mysql: mysql> use icinga; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Database changed mysql> set NAMES utf8; Query OK, 0 rows affected (0.00 sec)
mysql> SELECT * FROM icinga_comments WHERE comment_time='2014-08-13 11:27:18';
------------------------
*------------------------------------~~-------------*---------------------~~---------------------------------------------------------------------------------------------~~--------------*-----------------------~~--------------------*-------------------+ | 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 | endpoint_object_id |------------------------
*------------------------------------~~-------------*---------------------~~---------------------------------------------------------------------------------------------~~--------------*-----------------------~~--------------------*-------------------+ | 1 | 1 | 2014-11-20 18:11:52 | 923157 | 2 | 4 | 164 | 2014-08-13 11:27:18 | 16092 | Icinga Admin | ждем поставки памяти | 1 | 0 | 0 | 0000-00-00 00:00:00 | NULL |------------------------
*------------------------------------~~-------------*---------------------~~---------------------------------------------------------------------------------------------~~--------------*-----------------------~~--------------------*-------------------+ 1 row in set (0.00 sec)mysql>
comment_data in UTF8.
If icinga-web create the comment, it puts to database in UTF8 and I can read it from classic UI and console mysql. But I don't read my comment in icinga-web. I see only '???'
Relations: