Zabbix配置文件的参数优化和Zabbix的数据库优化

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


名称栏目:Zabbix配置文件的参数优化和Zabbix的数据库优化
网站链接:http://csdahua.cn/article/pgdsds.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流