Zabbix:中文乱码
在zabbix的使用过程中,你可能会遇到中文乱码的问题,具体如下:
首先,去MS Windows的系统的字体目录,拿到【楷体】的数据文件。
目录【C:\Windows\Fonts】
数据【simkai.ttf】
然后查看服务器:
1. 是否支持中文:
[cra[……]
Adamhuan's Data Center - 【逻辑驱动数据】
数据玩物、代码屋、1/0游戏:(零和博弈)/ 禅宗意志 / 规则战争 / 解放数据力量 / 技术的飞速发展并没有改变这个世界,因为,这个世界从没有变,它只是越来越趋近于它本来的模样。
在zabbix的使用过程中,你可能会遇到中文乱码的问题,具体如下:
首先,去MS Windows的系统的字体目录,拿到【楷体】的数据文件。
目录【C:\Windows\Fonts】
数据【simkai.ttf】
然后查看服务器:
1. 是否支持中文:
[cra[……]
在实现批量部署Zabbix-Agent的过程中,我的代码涉及到两个部分的内容。
1. 脚本的配置文件:host_connect_string.conf
1 2 3 4 5 6 7 8 9 |
[192.168.10.11] port = 22 username = root password = **** [192.168.10.21] port = 22 username = root password = *** |
代码本体:RemoteCommandInstall_Me.py[……]
如题所示的错误,发生在Zabbix服务启动的时候。
具体如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
[root@zabbix ~]# systemctl start zabbix-server [root@zabbix ~]# systemctl status zabbix-server ● zabbix-server.service - Zabbix Server Loaded: loaded (/usr/lib/systemd/system/zabbix-server.service; disabled; vendor preset: disabled) Active: activating (auto-restart) (Result: exit-code) since Fri 2018-03-30 23:39:16 CST; 6s ago Process: 26215 ExecStop=/bin/kill -SIGTERM $MAINPID (code=exited, status=1/FAILURE) Process: 26207 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=0/SUCCESS) Main PID: 26212 (code=exited, status=1/FAILURE) Mar 30 23:39:16 zabbix systemd[1]: Unit zabbix-server.service entered faile...e. Mar 30 23:39:16 zabbix systemd[1]: zabbix-server.service failed. Hint: Some lines were ellipsized, use -l to show in full. [root@zabbix ~]# [root@zabbix ~]# service zabbix-server status Redirecting to /bin/systemctl status zabbix-server.service ● zabbix-server.service - Zabbix Server Loaded: loaded (/usr/lib/systemd/system/zabbix-server.service; disabled; vendor preset: disabled) Active: activating (auto-restart) (Result: resources) since Fri 2018-03-30 23:39:57 CST; 8s ago Process: 26255 ExecStop=/bin/kill -SIGTERM $MAINPID (code=exited, status=1/FAILURE) Process: 26297 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=0/SUCCESS) Main PID: 26253 (code=exited, status=1/FAILURE) Mar 30 23:39:57 zabbix systemd[1]: zabbix-server.service never wrote its PID file. Failing. Mar 30 23:39:57 zabbix systemd[1]: Failed to start Zabbix Server. Mar 30 23:39:57 zabbix systemd[1]: Unit zabbix-server.service entered failed state. Mar 30 23:39:57 zabbix systemd[1]: zabbix-server.service failed. [root@zabbix ~]# |
这个过程中,日志报错如下:【/var/log/zabbix/zabbix_server.log】
[crayon-6045609f93163597912[……]
在Ubuntu中,源的设置地址在:/etc/apt/source.list
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-62-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage 348 packages can be updated. 0 updates are security updates. The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. root@phpIPAM:~# root@phpIPAM:~# cat /etc/apt/sources.list # # deb cdrom:[Ubuntu-Server 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.8)]/ xenial main restricted #deb cdrom:[Ubuntu-Server 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.8)]/ xenial main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. #deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted ## Major bug fix updates produced after the final release of the ## distribution. #deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. #deb http://us.archive.ubuntu.com/ubuntu/ xenial universe # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe #deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. #deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse #deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. #deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb http://archive.canonical.com/ubuntu xenial partner # deb-src http://archive.canonical.com/ubuntu xenial partner #deb http://security.ubuntu.com/ubuntu xenial-security main restricted # deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted #deb http://security.ubuntu.com/ubuntu xenial-security universe # deb-src http://security.ubuntu.com/ubuntu xenial-security universe #deb http://security.ubuntu.com/ubuntu xenial-security multiverse # deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse # ------------------------- deb http://mirrors.163.com/ubuntu/ zesty main restricted universe multiverse # ------------------------- #deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ zesty main restricted universe multiverse # ------------------------- #deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse #deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse #deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse #deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse root@phpIPAM:~# root@phpIPAM:~# root@phpIPAM:~# |
一般,修改了源文件后,可以对UBUNTU的源做出更新:
1 2 3 4 |
root@phpIPAM:~# apt-get update Hit:1 http://mirrors.163.com/ubuntu zesty InRelease Reading package lists... Done root@phpIPAM:~# |
对源做出检索:[……]
开始本文的前提:
安装有Zabbix Agent。
————————————————————————
这里,采用Percona的Monitoring Plugins配合Zabbix,实现监控。
具体的配置方法如下。
Percona Monitoring Plugins:
官方下载[……]