Zabbix系列之(五):汉化


title: Zabbix系列之(五):汉化
categories: Linux
tags:
- Zabbix
timezone: Asia/Shanghai
date: 2019-01-12

环境

[root@localhost ~]# cat /etc/centos-release
CentOS Linux release 7.5.1804 (Core)

[root@localhost ~]# zabbix_server -V
zabbix_server (Zabbix) 4.0.3
Revision 87993 20 December 2018, compilation time: Dec 20 2018 11:29:33

Copyright (C) 2018 Zabbix SIA
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it according to
the license. There is NO WARRANTY, to the extent permitted by law.

This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/).

Compiled with OpenSSL 1.0.1e-fips 11 Feb 2013
Running with OpenSSL 1.0.1e-fips 11 Feb 2013

[root@localhost ~]# zabbix_agentd -V
zabbix_agentd (daemon) (Zabbix) 4.0.3
Revision 87993 20 December 2018, compilation time: Dec 20 2018 11:29:54

Copyright (C) 2018 Zabbix SIA
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it according to
the license. There is NO WARRANTY, to the extent permitted by law.

This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/).

Compiled with OpenSSL 1.0.1e-fips 11 Feb 2013
Running with OpenSSL 1.0.1e-fips 11 Feb 2013

简介

虽然Zabbix Server管理页面提供了中文模式,但是在具体的模板监控项和触发器警告等等还是全部英文,所以这里说下这些部分的汉化方法。Zabbix Server服务端默认使用的是Mariadb数据库,直接采用直接修改数据库的方法

这里只是起了一个抛砖引玉的作用,其他具体需要汉化的可以自己补充。

一.登录Mariadb

mysql -uroot -p
use zabbix;

二.触发器部分汉化 - Template OS Linux

-- 操作前先备份表
DROP TABLE IF EXISTS triggers_666666;
CREATE TABLE triggers_666666 SELECT * FROM triggers;
COMMIT;

-- 开始更新表
UPDATE triggers SET `description` = 'Zabbix agent超过5分钟无法访问 - Zabbix agent on {HOST.NAME} is unreachable for 5 minutes' WHERE description = 'Zabbix agent on {HOST.NAME} is unreachable for 5 minutes';
UPDATE triggers SET `description` = '可用内存不足 - Lack of available memory on server {HOST.NAME}' WHERE description = 'Lack of available memory on server {HOST.NAME}';
UPDATE triggers SET `description` = '更改主机名 - Hostname was changed on {HOST.NAME}' WHERE description = 'Hostname was changed on {HOST.NAME}';
UPDATE triggers SET `description` = '可用交换空间不足 - Lack of free swap space on {HOST.NAME}' WHERE description = 'Lack of free swap space on {HOST.NAME}';
UPDATE triggers SET `description` = '太多的进程 - Too many processes on {HOST.NAME}' WHERE description = 'Too many processes on {HOST.NAME}';
UPDATE triggers SET `description` = '太多的活跃进程 - Too many processes running on {HOST.NAME}' WHERE description = 'Too many processes running on {HOST.NAME}';
UPDATE triggers SET `description` = '{HOST.NAME} 刚刚重启 - has just been restarted' WHERE description = '{HOST.NAME} has just been restarted';
COMMIT;

三.监控项部分汉化 - Template OS Linux

-- 操作前先备份表
DROP TABLE IF EXISTS items_666666;
CREATE TABLE items_666666 SELECT * FROM items;
COMMIT;

-- 开始更新表
UPDATE items SET `name` = '系统运行时间 - System uptime' WHERE NAME = 'System uptime';
UPDATE items SET `name` = '主机名 - Host name' WHERE NAME = 'Host name';
UPDATE items SET `name` = '内存 - Total memory' WHERE NAME = 'Total memory';
UPDATE items SET `name` = '交换空间 - Total swap space' WHERE NAME = 'Total swap space';
UPDATE items SET `name` = '空闲交换空间 - Free swap space' WHERE NAME = 'Free swap space';
UPDATE items SET `name` = '系统时间 - Host local time' WHERE NAME = 'Host local time';
UPDATE items SET `name` = '可用交换空间百分比 - Free swap space in %' WHERE NAME = 'Free swap space in %';
UPDATE items SET `name` = '可用内存 - Available memory' WHERE NAME = 'Available memory';
UPDATE items SET `name` = '系统信息 - System information' WHERE NAME = 'System information';
UPDATE items SET `name` = '开机时间 - Host boot time' WHERE NAME = 'Host boot time';
UPDATE items SET `name` = '进程数 - Number of processes' WHERE NAME = 'Number of processes';
UPDATE items SET `name` = '活跃进程数 - Number of running processes' WHERE NAME = 'Number of running processes';
UPDATE items SET `name` = '当前登录用户数量 - Number of logged in users' WHERE NAME = 'Number of logged in users';
UPDATE items SET `name` = '可用磁盘空间:/ - Free disk space on /' WHERE NAME = 'Free disk space on /';
UPDATE items SET `name` = '可用磁盘空间:/(百分比) - Free disk space on / (percentage)' WHERE NAME = 'Free disk space on / (percentage)';
UPDATE items SET `name` = '可用磁盘空间:/boot - Free disk space on /boot' WHERE NAME = 'Free disk space on /boot';
UPDATE items SET `name` = '可用磁盘空间:/boot(百分比) - Free disk space on /boot (percentage)' WHERE NAME = 'Free disk space on /boot (percentage)';
UPDATE items SET `name` = '已用磁盘空间:/ - Used disk space on /' WHERE NAME = 'Used disk space on /';
UPDATE items SET `name` = '已用磁盘空间:/boot - Used disk space on /boot' WHERE NAME = 'Used disk space on /boot';
UPDATE items SET `name` = 'Zabbix-agent版本 - Version of zabbix_agent(d) running' WHERE NAME = 'Version of zabbix_agent(d) running';
UPDATE items SET `name` = 'Zabbix-agent配置文件内主机名 - Host name of zabbix_agentd running' WHERE NAME = 'Host name of zabbix_agentd running';
COMMIT;
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值