詳細検索

Zabbix graph corrects Japanese garbled words

Avatar
by miyashitak
1 min read

Zabbix graph corrects Japanese garbled words
Translated from 日本語 • View original

Good morning. This is Infra Miyashita.

The graph settings of zabbix are not displayed in Japanese by default. *This is when the item name is in Japanese.

The operating environment looks like this.

OS: CentOS release 6.5 (Final) Version: zabbix-server-2.2.3

If you look at the graphs created with "Monitoring Data" → "Graphs", the Japanese parts will be □ as shown below. This is due to the fact that the item uses Japanese and there is no font when converting the image.

zabbix-graph

First, check where the font is placed.

# ls /usr/share/zabbix/fonts/
graphfont.ttf

Next, check the fonts installed in the OS.

$ ls /usr/share/fonts/
dejavu  ipa-gothic  ipa-mincho  ipa-pgothic  ipa-pmincho  vlgothic

Use IPA. Just put up a symbolic link and it's OK. In particular, you don't need to restart zabbix-server.

# ln -s /usr/share/fonts/ipa-pgothic/ipagp.ttf /usr/share/zabbix/fonts/ipagp.ttf
# vi /usr/share/zabbix/include/defines.inc.php
(Changes)
7                                                                                                                             
39c39
< define('ZBX_GRAPH_FONT_NAME',         'ipagp'); // font file name
---
> define('ZBX_GRAPH_FONT_NAME',         'graphfont'); // font file name
86c86
< define('ZBX_FONT_NAME', 'ipagp');
---
> define('ZBX_FONT_NAME', 'graphfont');

zabbix-graph-after

In this way, the graph was also displayed properly in Japanese.

Related Articles