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:20需要注意的是具体情况还需要根据水垢的严重度来进...
告诉一下金帝集成灶最新款适合开... 最佳回答 你说的蒸箱款呢?还是蒸烤一体机?我觉得金帝集成灶的设计都非常好看,跟橱柜搭配非常和谐,吸烟...
侧吸油烟机漏油怎么回事 侧吸油烟机漏油怎么回事1、有时候在安装的时候没有调整好角度,仰角不够,或者是清洗时间过长导致油箱的堵...
侧吸油烟机漏油了怎么办 侧吸油烟机是厨房中必不可少的家电之一,可以有效地吸收油烟,保持厨房清洁和舒适。然而,如果侧吸油烟机出...
方太吸油烟机声音大 可能是里面的油烟太多了,需要进行清洗。或者是油烟机要坏掉了,需要专业人员进行维修。如果油烟机不能安装...
男子男扮女装、衣着暴露在学校周... 近日,海南省文昌市互联网信息办公室在日常巡查中发现,某短视频平台网络主播杨某某多次以男扮女装、衣着暴...
伊朗最高领袖:战争让官员肩负更... 据英国天空新闻报道,伊朗现任最高领袖穆杰塔巴·哈梅内伊近日发表书面声明,在纪念已故前总统莱希逝世两周...
雨夜坠河的皮卡,满车都是亲戚 作者 | 黄泽敏 实习生 | 黄思婷 编辑 | 向现肖逸(化名)没有等来奇迹。5月18日,肖逸告诉南...
赖清德抛0到18岁月发5000... 海峡导报综合报道 台湾地区领导人赖清德20日发表两周年就职演说,宣称台当局近日将提出所谓台湾人口对策...