在$ZABBIX_PATH/include/defines.inc.php文件中修改771行(zabbix-2.2.8),加入中文字符支持,
原始正则:
define('ZBX_PREG_INTERNAL_NAMES', '([0-9a-zA-Z_. -]+)');/* !!! Don't forget code with C !!! */
修改为:
// x80-xff:匹配用GBK (GB2312/GB18030)编码的所有汉字和标点符号
define('ZBX_PREG_INTERNAL_NAMES', '([0-9a-zA-Z_. -x{80}-x{ff}]+)');/* !!! Don't forget code with C !!! */