Refactor: Containerization and directory restructuring
This commit is contained in:
53
partitioning/script/zabbix_partitioning.conf
Normal file
53
partitioning/script/zabbix_partitioning.conf
Normal file
@@ -0,0 +1,53 @@
|
||||
# database: Connection details for the Zabbix database
|
||||
database:
|
||||
type: mysql
|
||||
# host: Database server hostname or IP
|
||||
host: localhost
|
||||
# socket: Path to the MySQL unix socket (overrides host if set)
|
||||
socket: /var/run/mysqlrouter/mysql_rw.sock
|
||||
# port: Database port (default: 3306)
|
||||
# port: 3306
|
||||
# credentials
|
||||
user: zbx_part
|
||||
passwd: <password>
|
||||
db: zabbix
|
||||
|
||||
# partitions: Define retention periods for tables.
|
||||
# Format: table_name: duration (e.g., 14d, 12w, 1m, 1y)
|
||||
partitions:
|
||||
# daily: Partitions created daily
|
||||
daily:
|
||||
- history: 14d
|
||||
- history_uint: 14d
|
||||
- history_str: 14d
|
||||
- history_text: 14d
|
||||
- history_log: 14d
|
||||
- history_bin: 14d
|
||||
# weekly: Partitions created weekly
|
||||
weekly:
|
||||
# - auditlog: 180d
|
||||
# Note: auditlog is not partitionable by default in Zabbix 7.0 and 7.4 (PK missing clock).
|
||||
# To partition, the Primary Key must be altered to include 'clock'.
|
||||
# https://www.zabbix.com/documentation/current/en/manual/appendix/install/auditlog_primary_keys
|
||||
# monthly: Partitions created monthly
|
||||
monthly:
|
||||
- trends: 1y
|
||||
- trends_uint: 1y
|
||||
|
||||
# logging: Where to send log output. Options: syslog, console
|
||||
logging: syslog
|
||||
|
||||
# premake: Number of partitions to create in advance
|
||||
premake: 10
|
||||
|
||||
# initial_partitioning_start: Strategy for the first partition during initialization (--init).
|
||||
# Options:
|
||||
# db_min: (Default) Queries SELECT MIN(clock) to ensure ALL data is covered. Slow on huge tables consistently.
|
||||
# retention: Starts partitioning from (Now - Retention Period).
|
||||
# Creates a 'p_archive' partition for all data older than retention.
|
||||
# Much faster as it skips the MIN(clock) query. (Recommended for large DBs)
|
||||
initial_partitioning_start: db_min
|
||||
|
||||
# replicate_sql: False - Disable binary logging. Partitioning changes are NOT replicated to slaves (use for independent maintenance).
|
||||
# replicate_sql: True - Enable binary logging. Partitioning changes ARE replicated to slaves (use for consistent cluster schema).
|
||||
replicate_sql: False
|
||||
Reference in New Issue
Block a user