feat: enterprise audit fixes (schema resolution, race conditions, documentation)

This commit is contained in:
Maksym Buz
2026-04-30 10:49:53 +00:00
parent 59b2780125
commit c401efea51
9 changed files with 232 additions and 54 deletions

View File

@@ -38,33 +38,10 @@ All procedures, information, statistics and configuration are stored in the `par
## Installation
The installation is performed by executing the SQL procedures in the following order:
1. Initialize schema (`00_schema_create.sql`).
2. Install maintenance procedures (`01_maintenance.sql`).
3. Enable partitioning on tables (`02_enable_partitioning.sql`).
4. Install monitoring views (`03_monitoring_view.sql`).
> [!IMPORTANT]
> **Please refer to the [MANUAL.md](MANUAL.md) for the complete, step-by-step, foolproof installation instructions.**
> The manual contains critical safety procedures, backup warnings, and copy-pasteable commands for a safe deployment.
**Command Example:**
You can deploy these scripts manually against your Zabbix database using `psql`. Navigate to the `procedures/` directory and run:
```bash
# Connect as the zabbix database user
export PGPASSWORD="your_zabbix_password"
DB_HOST="localhost" # Or your DB endpoint
DB_NAME="zabbix"
DB_USER="zbxpart_admin"
for script in 00_schema_create.sql 01_maintenance.sql 02_enable_partitioning.sql 03_monitoring_view.sql; do
echo "Applying $script..."
# -v ON_ERROR_STOP=1 forces psql to exit immediately with an error code if any statement fails
if ! psql -v ON_ERROR_STOP=1 -h $DB_HOST -U $DB_USER -d $DB_NAME -f "$script"; then
echo -e "\nERROR: Failed to apply $script."
read -p "Press [Enter] to forcefully continue anyway, or Ctrl+C to abort... "
else
echo -e "Successfully applied $script.\n----------------------------------------"
fi
done
```
## Configuration