Zabbix配置文件的参数优化和Zabbix的数据库优化
admin
2023-05-26 10:21:30
0

Zabbix配置文件的参数优化

AlertScriptsPath=/usr/local/zabbix/alertscripts

CacheSize=1024M

CacheUpdateFrequency=300

DebugLevel=3

DBHost=localhost

DBName=zabbix

DBUser=zabbix

DBPassword=zabbix

DBSocket=/var/lib/mysql/mysql.sock

ListenPort=10051

LogFileSize=5

LogType=file

LogFile=/data/logs/zabbix/zabbix_server.log

StartPollers=500

StartIPMIPollers=20

StartPollersUnreachable=80

StartTrappers=20

StartPingers=100

SenderFrequency=60

StartDBSyncers=16

StartDiscoverers=120 #zabbix提示进程繁忙时修改此参数,最大二百五,建议100左右,值大消耗cpu性能大

HistoryCacheSize=1024M

Timeout=30

TrendCacheSize=1024M

TrapperTimeout=120

LogSlowQueries=1000

UnreachablePeriod=30

UnavailableDelay=60

ValueCacheSize=1G

JavaGateway=127.0.0.1

JavaGatewayPort=10052

StartJavaPollers=12

PidFile=/tmp/zabbix_server.pid


Zabbix的数据库优化

egrep -v "(^#|^$)" /etc/my.cnf

[client]

port=3306

socket=/var/lib/mysql/mysql.sock

[mysqld]

port=3306

socket=/var/lib/mysql/mysql.sock

skip-external-locking

character-set-server=utf8

slow_query_log

slow_query_log_file=/var/log/mysql/slowquery.log

long_query_time=2

log-error=/var/log/mysql/log-error.log

skip-name-resolve

max_connections=5000

back_log=300

table-cache=4096

max_allowed_packet=32M

max-heap-table-size=128M

key_buffer_size=128M

sort-buffer-size=16M

join-buffer-size=16M

net_buffer_length=8K

read_buffer_size=256K

read_rnd_buffer_size=512K

myisam_sort_buffer_size=8M

thread-cache-size=16

thread-concurrency=24

query-cache-size=4096M

query-cache-limit=4M

tmp-table-size=128M

log_warnings

innodb_file_per_table=1

innodb_file_io_threads=4

innodb_open_files=2048

innodb_buffer_pool_size=10G

innodb_additional_mem_pool=16M

innodb_thread_concurrency=16

innodb_max_dirty_pages_pct=90

log-bin=mysql-bin

binlog_format=mixed

server-id=1

[mysqldump]

quick

max_allowed_packet=16M

[mysql]

no-auto-rehash

[myisamchk]

key_buffer_size=20M

sort_buffer_size=20M

read_buffer=2M

write_buffer=2M

[mysqlhotcopy]

interactive-timeout



生产环境zabbix配置文件

AlertScriptsPath=/usr/local/zabbix/alertscripts

CacheSize=1024M

CacheUpdateFrequency=300

DebugLevel=3

DBHost=localhost

DBName=zabbix

DBUser=zabbix

DBPassword=zabbix

DBSocket=/var/lib/mysql/mysql.sock

ListenPort=10051

LogFileSize=5

LogType=file

LogFile=/data/logs/zabbix/zabbix_server.log

StartPollers=500

StartIPMIPollers=20

StartPollersUnreachable=80

StartTrappers=20

StartPingers=100

SenderFrequency=60

StartDBSyncers=16

StartDiscoverers=120

HistoryCacheSize=1024M

Timeout=30

TrendCacheSize=1024M

TrapperTimeout=120

LogSlowQueries=1000

UnreachablePeriod=30

UnavailableDelay=60

ValueCacheSize=1G

JavaGateway=127.0.0.1

JavaGatewayPort=10052

StartJavaPollers=12

PidFile=/tmp/zabbix_server.pid













相关内容

热门资讯

事业编笔试第1名称遭第2名花钱... 近日,网传广东省雷州市特殊教育学校有关人员在教师招聘中存在违规行为,引发社会广泛关注。8月5日,广东...
印度乘客打车不付钱只笑嘻嘻说谢... 一段走红网络的视频显示,8月3日,一位印度乘客在越南搭乘出租车。车辆抵达目的地后,他却告诉司机,“我...
“如果美国能封锁AI,他们将再... “如果美国能在这里封锁AI,他们将再控制全球南方200年。”国际民众合作协会(IAPC)拉美协调员、...
黄河科技学院为新生送上“大礼包... 盛夏渐远,新程将至。黄河科技学院为2026级新生量身打造了一份涵盖经济帮扶、专业调整、学业提升与专属...
中科美菱获得实用新型专利授权:... 证券之星消息,根据天眼查APP数据显示中科美菱(920992)新获得一项实用新型专利授权,专利名为“...
华为史上续航最长平板发布!仅厚... 【CNMO科技消息】8月5日,华为MatePad Pro 12英寸平板正式发布,售价5999元起。 ...
移远通信获得实用新型专利授权:... 证券之星消息,根据天眼查APP数据显示移远通信(603236)新获得一项实用新型专利授权,专利名为“...
被呼吁辞职之际,因凡蒂诺与FI... 【环球网快讯】据法新社最新消息,国际足联(FIFA)主席因凡蒂诺当地时间周三(5日)在摩洛哥与FIF...
原创 S... ## 这是猎鹰9号火箭上面级箭体将与月球相撞的地点。这枚废弃火箭将以每小时5400英里(8700公...
“婚外胚胎案”当事妻子:胚胎若... 连日来,“妻子申请销毁丈夫婚外胚胎遭拒”一事持续引发网友的广泛关注。8月5日上午,扬子晚报/紫牛新闻...