在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;