個人數據庫sock文件在這 /data/mysql/mysql.sockmysql
[root@bash-5 ~]# mkdir /var/lib/mysql/
[root@bash-5 ~]# ln -s /data/mysql/mysql.sock /var/lib/mysql/mysql.sock
[root@bash-5 ~]# ll /var/lib/mysql/mysql.sock
lrwxrwxrwx 1 root root 22 Feb 14 19:30 /var/lib/mysql/mysql.sock -> /data/mysql/mysql.sock
一:重啓zabbix-server 結合定時任務sql
service zabbix-server restart數據庫
crontab -e 新加一個定時任務:bash
@daily service zabbix-server restart > /dev/null 2>&1服務器
二:編輯Zabbix Server的配置文件/etc/zabbix/zabbix_server.conf,找到配置StartPollers的段落:socket
直接在這增長一行: StartPollers=10性能
Proxy的在這裏: spa
### Option: StartProxyPollers
# Number of pre-forked instances of pollers for passive proxies.
#
# Mandatory: no
# Range: 0-250
# Default:
# StartProxyPollers=1
StartProxyPollers=5rest
將參數配置改爲多少取決於服務器的性能和監控的數量。內存足夠的話能夠設置高些code
[root@localhost zabbix] vi /etc/zabbix/zabbix_server.conf
### Option: CacheSize
# Size of configuration cache, in bytes.
# Shared memory size for storing host, item and trigger data.
#
# Mandatory: no
# Range: 128K-2G
# Default:
# CacheSize=8M
CacheSize=256M
[root@localhost zabbix]# systemctl restart zabbix-server
修改 zabbix_server.conf配置文件,定位到ValueCacheSize,而後調高ValueCacheSize大小,大小根據本身環境調整
### Option: ValueCacheSize
# Size of history value cache, in bytes.
# Shared memory size for caching item history data requests.
# Setting to 0 disables value cache.
#
# Mandatory: no
# Range: 0,128K-64G
# Default:
ValueCacheSize=64M ####默認爲8M