zabbix-proxy配置

时间:2024-10-05 18:34:50

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@--
StartPollers=
StartTrappers=
StartPollersUnreachable=
Timeout=
CacheSize=2048M
HistoryCacheSize=512M
HistoryIndexCacheSize=512M
LogSlowQueries=
ConfigFrequency=
DataSenderFrequency=
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=
StartPollersUnreachable=
StartTrappers=
StartPingers=
StartDiscoverers=
CacheSize=2G
StartDBSyncers=
HistoryCacheSize=2048M
TrendCacheSize=1024M
ValueCacheSize=2048M
Timeout=
AlertScriptsPath=/zabbixscripts
LogFile=/tmp/zabbix_server.log
LogSlowQueries=
AllowRoot=

3,mysql-5.6.35的my.cnf

# cat /etc/my.cnf
[client]
port =
socket = /data/mysql_data/mysql.sock
default-character-set = utf8
############################################ [mysqld]
# basic settings
port =
socket = /data/mysql_data/mysql.sock
back_log =
max_connections =
max_connect_errors =
transaction_isolation = READ-COMMITTED
max_allowed_packet = 1024M
open_files_limit=
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 =
query_cache_limit = 2M
query_cache_type= # binlog setting
log_bin=binlog/binlog
binlog_format=row
log_slave_updates=on
sync_binlog=
expire_logs_days = # slow query settings
slow-query-log
#log-queries-not-using-indexes
long_query_time =
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=
innodb_buffer_pool_size = 93G
innodb_flush_log_at_trx_commit =
innodb_log_buffer_size = 16M
innodb_log_file_size = 1024M
innodb_log_files_in_group =
innodb_max_dirty_pages_pct =
innodb_stats_on_metadata=
innodb_flush_method=O_DIRECT
innodb_lock_wait_timeout =
thread_cache_size =
#thread_concurrency =
innodb_write_io_threads=
innodb_read_io_threads=
innodb_io_capacity =
innodb_io_capacity_max =
innodb_thread_concurrency=
innodb_purge_threads= # 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 =
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 =
tmp_table_size = 128M
max_heap_table_size = 2048M
myisam_max_sort_file_size = 10G
myisam_repair_threads = #####################################################
[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 =