语言设置为中文时,页面乱码如图,有小方块,影响监测
Windows10字体路径,选择想更换的字体
将zabbix默认字体修改为自己想换的字体
# pwd
/usr/share/zabbix/assets/fonts //zabbix5.0字体文件目录
# ls
graphfont.ttf
# mv graphfont.ttf graphfont.ttf.bak
# ls
graphfont.ttf.bak
# ls
graphfont.ttf.bak simsun.ttc
# mv simsun.ttc simsun.ttf
# vim /usr/share/zabbix/include/defines.inc.php //脚本路径
define('ZBX_GRAPH_FONT_NAME', 'simsun'); // font file name
define('ZBX_FONT_NAME', 'simsun');
systemctl restart zabbix-server.service
1. 配置的每个discovery任务在一定时间内占用1个discovery进程,而zabbix_server.conf中默认配置只有1个discovery(被注释,默认生效);
2. 同时为了快速验证自动发现效果,将discovery任务的"Delay"时间由默认的3600s设置成60s。
vi /etc/zabbix/zabbix_server.conf
### Option: StartDiscoverers
# Number of pre-forked instances of discoverers.
#
# Mandatory: no
# Range: 0-250
# Default:
StartDiscoverers=150
页面显示zabbix server is not running
20200827原因:数据库连接满
现象:/var/log/zabbix/zabbix_server.log
one child process died
10051端口down
调整MariaDB修改最大连接数:
#vim /etc/my.cnf
[mysqld]
max_connections=3000
重启Mariadb
#systemctl restart mariadb.service
http://www.ttlsa.com/zabbix/zabbix_agentd-conf-description/
https://www.cnblogs.com/cloudos/p/8301756.html
使用root用户进入系统
# useradd -s /sbin/nologin zabbix
上传文件到/home/zabbix/,解压缩
# pwd
/home/zabbix
ls
# zabbix_agent-5.0.2-linux-3.0-amd64-static.tar.gz
tar -zxf zabbix_agent-5.0.2-linux-3.0-amd64-static.tar.gz
# ls
bin conf sbin zabbix_agent-5.0.2-linux-3.0-amd64-static.tar.gz
vim /home/zabbix/conf/zabbix_agentd.conf
Server=10.2.2.100 # zabbix-server或者zabbix-proxy的ip
ServerActive=192.168.137.129 # zabbix-server或者zabbix-proxy的ip
Hostname=swarm-node3 # 主机名
AllowKey=system.run[*] # 允许zabbix使用system.run监控项执行命令
# /home/zabbix/sbin/zabbix_agentd -c /home/zabbix/conf/zabbix_agentd.conf
# ps -ef | grep zabbix
zabbix 6197 1 0 17:53 ? 00:00:00 /home/zabbix/sbin/zabbix_agentd -c /home/zabbix/conf/zabbix_agentd.conf
zabbix 6198 6197 0 17:53 ? 00:00:00 /home/zabbix/sbin/zabbix_agentd: collector [idle 1 sec]
zabbix 6199 6197 0 17:53 ? 00:00:00 /home/zabbix/sbin/zabbix_agentd: listener #1 [waiting for connection]
zabbix 6200 6197 0 17:53 ? 00:00:00 /home/zabbix/sbin/zabbix_agentd: listener #2 [waiting for connection]
zabbix 6201 6197 0 17:53 ? 00:00:00 /home/zabbix/sbin/zabbix_agentd: listener #3 [waiting for connection]
zabbix 6202 6197 0 17:53 ? 00:00:00 /home/zabbix/sbin/zabbix_agentd: active checks #1 [idle 1 sec]
root 6214 3007 0 17:53 pts/0 00:00:00 grep zabbix
使用预编译agent,直接安装即可
https://my.oschina.net/kcw/blog/4319827
https://blog.csdn.net/czk097520/article/details/89030069
aix_rpm下载:ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/
官方文档:https://www.zabbix.com/documentation/4.0/zh/manual/config/items/itemtypes/snmptrap
vi zabbix_server.conf
StartSNMPTrapper=1
SNMPTrapperFile=[TRAP FILE]
snmptrapd应该配置为使用SNMPTT
配置centos epel源
rpm -ivh http://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
yum install -y epel-release
https://blog.51cto.com/11555417/2287685
zabbix监控时间不同步会有警告:
# vim /etc/ntp.conf
server xxx.xxx.xxx.xxx ---添加NTP服务器地址
# vim /etc/sysconfig/ntpd
SYNC_HWCLOCK=yes
#/etc/init.d/ntpd start ---开启NTP服务
#hwclock --systohc ---同步硬件时间
# netstat -upnl |grep ntpd //查看时程
# ntpq -pn //查看同步的服务器IP
remote refid st t when poll reach delay offset jitter
==============================================================================
50.77.217.185 .INIT. 16 u - 64 0 0.000 0.000 0.000
202.90.158.4 .INIT. 16 u - 64 0 0.000 0.000 0.000
202.71.100.89 .INIT. 16 u - 64 0 0.000 0.000 0.000
202.134.1.10 .INIT. 16 u - 64 0 0.000 0.000 0.000
*127.127.1.0 .LOCL. 10 l 18 64 377 0.000 0.000 0.001
# ntpstat //同步的结果
synchronised to local net at stratum 11
time correct to within 12 ms
polling server every 512 s
#vim /etc/chrony.conf
pool xxx.xxx.xxx.xxx iburst
# systemctl start chronyd ---启动chrony服务
# systemctl enable chronyd ---开机启动chrony服务
# chronyc sources -v ---验证NTP同步状态
210 Number of sources = 1
.-- Source mode '^' = server, '=' = peer, '#' = local clock.
/ .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| / '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
|| .- xxxx [ yyyy ] +/- zzzz
|| Reachability register (octal) -. | xxxx = adjusted offset,
|| Log2(Polling interval) --. | | yyyy = measured offset,
|| \ | | zzzz = estimated error.
|| | | \
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* bogon 4 8 377 88 +6168us[+9738us] +/- 193ms
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。