[centreon]centreon检测的输出宽字符处理

2022-05-20 14:18:09 浏览数 (1)

在icinga2中使用centreon-plugins来检测snmp服务,有时候输出会有宽字符的问题,如:

代码语言:javascript复制
Wide character in print at /usr/lib/nagios/plugins/thirdparty/centreon-plugins/centreon/plugins/output.pm line 479.

今天看了下perl,解决方法很简单,使用utf8就好

修改文件

/usr/lib/nagios/plugins/thirdparty/centreon-plugins/centreon/plugins/output.pm,

添加一行use utf8::all:

代码语言:javascript复制
package centreon::plugins::output;

use strict;
use warnings;
use centreon::plugins::misc;
use utf8::all;

0 人点赞