problem :
Usually after the installation of Zabbix after the default display is the English interface, although 1-2 months is also accustomed to, but for the first contact with the people of English is not very friendly, so in order to facilitate the future or the interface to the Chinese language; When you change to Chinese, you will encounter garbled problems when viewing the chart because of inconsistent font formatting. , the purpose of this article is to solve the two common problems.
Environment
zabbix3.2.7
centos7.3
Zabbix Change to Chinese interface
1, enter the Zabbix IP, enter the Zabbix Web interface such as
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/9E/23/wKioL1mMJ_aBJNL4AAFPIzBDOdM451.jpg "title=" Zabbix1.jpg "alt=" Wkiol1mmj_abjnl4aafpizbdodm451.jpg "/>
2, according to the figure click on the top right of a similar villain settings
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/9E/2C/wKiom1mMHy6wJphAAAASMbzZf8M855.png "style=" float : none; "title=" Zabbix2.png "alt=" Wkiom1mmhy6wjphaaaasmbzzf8m855.png "/>
3, after the appearance of the following interface, in the language option to select Chinese Chinese
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9E/2C/wKiom1mMH2PxhHo3AABtF-59hsI540.png "title=" Zabbix3.png "alt=" Wkiom1mmh2pxhho3aabtf-59hsi540.png "/>
3. Click Update after selecting Chinese
650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/9E/2C/wKiom1mMHy_BBe9YAABWCF5q7Xw509.png "style=" float : none; "title=" Zabbix4.png "alt=" Wkiom1mmhy_bbe9yaabwcf5q7xw509.png "/>
4, after the interface into Chinese characters.
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/9E/2C/wKiom1mMHzDC75reAAD3cgF8rwY519.png "style=" float : none; "title=" Zabbix5.png "alt=" Wkiom1mmhzdc75reaad3cgf8rwy519.png "/>
Zabbix Eliminate garbled characters
After the interface becomes Chinese, click on the Monitor---graphics, you will find that the graphic below the garbled result in the data can not be displayed properly; The problem is that Zabbix uses "Dejavusans.ttf" By default (zabbix3.2.7 uses " Graphfont.ttf"), the font for Chinese support is not good, so the data below will be garbled.
The workaround is to upload the local Chinese font to the Zabbix fonts directory, and then modify the defines.inc.php under include to convert all the "Dejavusans.ttf" in the text (Graphfont.ttf ), replace with the uploaded Chinese font, which is shown in bold for example
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/9E/2C/wKiom1mMHzDx6wXYAACzUgpsMVU199.png "style=" float : none; "title=" Zabbix6.png "alt=" Wkiom1mmhzdx6wxyaaczugpsmvu199.png "/>
1, in the local C:\Windows\Fonts choose their favorite font, here to choose Bold (I only tested the song body, italics, boldface, and other Chinese fonts should be supported)
2. Upload the Blackbody font to the Zabbix fonts directory (fonts under Zabbix Web installation path) via xftp (or other upload tool )
After uploading, I do not know why, will be automatically capitalized, where you need to manually change the upper case to lowercase letters, otherwise Zabbix is not recognized.
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/9E/2D/wKiom1mMI1GRM5qkAAA1zJ1oFwg204.png "title=" Zabbix8.png "alt=" Wkiom1mmi1grm5qkaaa1zj1ofwg204.png "/>
specific steps such as; (Here you can see that the default fonts in the zabbix3.2.7 version are soft links to/etc/alternatives/zabbix-web-font)
3, modify the defines.inc.php under the Include
650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M02/9E/2D/wKiom1mMI_myzsojAAALxJANS74570.png "title=" Zabbix9.png "alt=" Wkiom1mmi_myzsojaaalxjans74570.png "/>
Note: The directory is the path where the Zabbix Web installation resides
4, vim edit the file, using the %s/graphfont/simhei/g command to replace the Graphfont global
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/9E/2D/wKiom1mMJPCzuOTSAABZL_M4tNU769.png "title=" Zabbix10.png "alt=" Wkiom1mmjpczuotsaabzl_m4tnu769.png "/>
5. Reload the Web service systectl Reload httpd/nginx-s Reload
6. Refresh the page
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/9E/2D/wKiom1mMJY_SnI2QAACe5fc_Hwc292.png "title=" Zabbix11.png "alt=" Wkiom1mmjy_sni2qaace5fc_hwc292.png "/>
Summary :
Zabbix's Chinese and garbled solution is generally written above; zabbix3.2.7 before and zabbix3.2.7 the default font has changed, no longer the previous "Dejavusans.ttf" If you are using the zabbix3.2.7 version, please note that we are replacing the default font in the fonts file instead of the content that is found on the web. If you do not know what to replace, you can find the "font_name" keyword in defines.inc.php , which corresponds to the default font used by the current Zabbix. To replace it with a different Chinese font, you only need to replace the default font that follows the keyword globally.
This article is from "Zhang Fan-it's fantasy drifting" blog, please be sure to keep this source http://chawan.blog.51cto.com/9179874/1955182
Zabbix-web's Chinese display and its garbled problem solving method