設置中文后,查看圖形有亂碼,文字變成了方塊
Win+R打開運行,輸入fonts,回車進入Windows字體目錄,找到微軟雅黑-常規字體,復制出來將文件名修改為msyh.ttf,注意后綴ttf。

將msyh.ttf上傳到服務器zabbix字體目錄中:
/usr/share/zabbix/fonts/
修改配置文件
查看字體配置# grep FONT_NAME /usr/share/zabbix/include/defines.inc.php -n
45:define('ZBX_GRAPH_FONT_NAME', 'graphfont'); // font file name
93:define('ZBX_FONT_NAME', 'graphfont');
確認字體名稱是否可以替換
# grep graphfont /usr/share/zabbix/include/defines.inc.php -n
45:define('ZBX_GRAPH_FONT_NAME', 'graphfont'); // font file name
93:define('ZBX_FONT_NAME', 'graphfont');
執行快捷替換
# sed -i "s/graphfont/msyh/g" /usr/share/zabbix/include/defines.inc.php
確認是否替換成功
# grep FONT_NAME /usr/share/zabbix/include/defines.inc.php -n
45:define('ZBX_GRAPH_FONT_NAME', 'msyh'); // font file name
93:define('ZBX_FONT_NAME', 'msyh');

