您的位置 首页 php

zabbix中文乱码解决办法

问题现象:

zabbix字体修改成中文后监控显示乱码

zabbix中文乱码解决办法

原因:

该问题是由于zabbix默认使用的是“DejaVuSans.ttf”(zabbix3.2.7默认使用的是“graphfont.ttf”),该字体对中文支持度不好,因此数据会有乱码。

解决办法:

1、从window电脑上面获取字体文件 simsun.ttc(字体随意)

zabbix中文乱码解决办法

2、将字体上传至zabbix的fonts目录中(目录不知道直接查找)

 find / -name fonts   (查找字体位置)
cd /usr/share/zabbix/asseets/fonts
mv simsun.ttc simsun.ttf   #重命名字体格式  

3、修改locales.inc.php配置文件(具体路径是实际环境为准)

vim /usr/share/zabbix/ include /locales.inc.php

修改内容:’zh_CN’ => [‘name’ => _(‘Chinese (zh_CN)’), ‘ display ‘ => true],

4、修改defines.inc.php配置文件(具体路径是实际环境为准)

 vim /usr/share/zabbix/include/defines.inc.php

使用%s/graphfont/simsun/g命令对graphfont进行全局替换  (其中simsun为你上传的字体)  

5、重启httpd服务,建议zabbix服务一起重启

 systemctl restart httpd
systemctl restart zabbix-server  

6、再次查看,乱码解决

文章来源:智云一二三科技

文章标题:zabbix中文乱码解决办法

文章地址:https://www.zhihuclub.com/152853.shtml

关于作者: 智云科技

热门文章

评论已关闭

6条评论

  1. This is also used to naturally induce labor once women hit 38 weeks and are concerned with having to deal with a medical induction

  2. 3 Triton X 100 in PBS, then incubated in primary followed by secondary antibodies or for Immunofluorescent staining fluorescently labeled lectin Griffonia simplicifolia II neck cell specific GS II; 1 1, 000; Invitrogen

  3. Diesel likes my sausage Join Date Feb 2004 Location Upstate, New York Age 37 Posts 877 Rep Power 1688

  4. If a woman goes through menopause very early significantly before age 50 her risk of developing heart disease is quite high if she does not take hormone therapy Drug registry part 1 Estimations of efficacy and safety

网站地图