1,proxy配置
# cat /etc/zabbix/zabbix_proxy.conf Server=192.168.1.1 Hostname=proxy.com LogFile=/tmp/zabbix_proxy.log DBHost=192.168.1.5 DBName=zabbix_proxy DBUser=zabbix DBPassword=Zabbix@2016-- StartPollers=500 StartTrappers=50 StartPollersUnreachable=20 Timeout=30 CacheSize=2048M HistoryCacheSize=512M HistoryIndexCacheSize=512M LogSlowQueries=3000 ConfigFrequency=60 DataSenderFrequency=60 PidFile=/tmp/zabbix_proxy.pid
2、zabbix-server.conf
# cat /etc/zabbix/zabbix_server.conf DBHost=192.168.1.9 DBName=zabbix DBUser=zabbix DBPassword=asdfsdf DBSocket=/data/mysql/mysql.sock StartPollers=500 StartPollersUnreachable=40 StartTrappers=20 StartPingers=10 StartDiscoverers=10 CacheSize=2G StartDBSyncers=30 HistoryCacheSize=2048M TrendCacheSize=1024M ValueCacheSize=2048M Timeout=30 AlertScriptsPath=/zabbixscripts LogFile=/tmp/zabbix_server.log LogSlowQueries=3000 AllowRoot=1
3,mysql-5.6.35的my.cnf
# cat /etc/my.cnf [client] port = 3306 socket = /data/mysql_data/mysql.sock default-character-set = utf8 ############################################ [mysqld] # basic settings port = 3306 socket = /data/mysql_data/mysql.sock back_log = 300 max_connections = 2000 max_connect_errors = 9999 transaction_isolation = READ-COMMITTED max_allowed_packet = 1024M open_files_limit=8192 init_connect="set names utf8" skip-name-resolve character_set_server = utf8 collation-server = utf8_general_ci skip-character-set-client-handshake secure-file-priv= /tmp # query cache setting query_cache_size = 0 query_cache_limit = 2M query_cache_type=0 # binlog setting log_bin=binlog/binlog binlog_format=row log_slave_updates=on sync_binlog=0 expire_logs_days = 3 # slow query settings slow-query-log #log-queries-not-using-indexes long_query_time = 3 slow_query_log_file = mysql-slow.log # memory/performance settings binlog_cache_size = 2M sort_buffer_size = 2M join_buffer_size = 2M key_buffer_size = 32M read_buffer_size = 2M read_rnd_buffer_size = 16M bulk_insert_buffer_size = 64M thread_stack = 192K myisam_sort_buffer_size = 128M innodb_file_per_table=1 innodb_buffer_pool_size = 93G innodb_flush_log_at_trx_commit = 2 innodb_log_buffer_size = 16M innodb_log_file_size = 1024M innodb_log_files_in_group = 6 innodb_max_dirty_pages_pct = 60 innodb_stats_on_metadata=0 innodb_flush_method=O_DIRECT innodb_lock_wait_timeout =8 thread_cache_size = 32 #thread_concurrency = 8 innodb_write_io_threads=16 innodb_read_io_threads=8 innodb_io_capacity = 500 innodb_io_capacity_max = 6000 innodb_thread_concurrency=100 innodb_purge_threads=1 # file settings datadir = /data/mysql_data innodb_log_group_home_dir = /data/mysql_data innodb_data_home_dir = /data/mysql_data #innodb_data_file_path = <INNODB_FILE_LIST> general_log_file = mysql.log log_error = mysql.err pid_file = mysql.pid tmpdir=/data/mysql_data/tmpdir # replication settings server-id = 422 relay_log_space_limit=10G skip-slave-start relay_log = binlog/relay relay_log_info_file = binlog/relay.info master_info_file = binlog/master.info # for switchover replicate-ignore-table=c2c_db.t_node_status # other settings tmp_table_size = 128M ft_min_word_len = 4 tmp_table_size = 128M max_heap_table_size = 2048M myisam_max_sort_file_size = 10G myisam_repair_threads = 1 ##################################################### [mysqldump] quick max_allowed_packet = 16M ##################################################### [mysql] no-auto-rehash [isamchk] key_buffer = 512M sort_buffer_size = 512M read_buffer = 8M write_buffer = 8M ##################################################### [myisamchk] key_buffer = 512M sort_buffer_size = 512M read_buffer = 8M write_buffer = 8M [mysqlhotcopy] interactive-timeout ##################################################### [mysqld_safe] open-files-limit = 8192