Deploy the PostgreSQL database
The ECA cluster stores audit events in a PostgreSQL database. Deploy the database before you install the ECA cluster on FlashBlade or FlashArray, and use the same procedure for both platforms.
Before you begin
- Provision a Linux server with PostgreSQL installed. SUSE Linux Enterprise Server 15 SP5 is the recommended operating system.
- Size the server at 16 vCPU and 64 GB RAM. Add disk based on your event rate and retention. Very high event rates can require more resources.
- Make sure the database server, Eyeglass, and every ECA node can reach each other on the network.
- Choose a strong password for the database user that Eyeglass and the ECA nodes use.
Step 1: Create the database and user
- Connect to PostgreSQL on the database server as the
postgresuser. - Create a database named
eyeglass. - Create a dedicated login role for Eyeglass and the ECA nodes. Do not reuse the
postgresadministrator account. - Grant the role privileges to read, write, and alter tables in the
eyeglassdatabase, and make it the owner of the database. - Verify the role attributes.
Step 2: Configure password encryption
Set password encryption to scram-sha-256 in postgresql.conf so that it persists after a restart.
Note: A session-level
SET password_encryptiondoes not persist across restarts. Set the value in the configuration file.
Step 3: Allow remote connections
- In
postgresql.conf, setlisten_addressesso the server accepts connections from Eyeglass and the ECA nodes. - In
pg_hba.conf, add onehostentry with thescram-sha-256method for Eyeglass and one for each ECA node. - Remove the default localhost entry if present.
- Reload the PostgreSQL configuration.
Step 4: Apply performance settings
Add or modify the following memory, write-ahead log (WAL), parallelism, and I/O settings in postgresql.conf for a 16 vCPU, 64 GB server, and then restart PostgreSQL.
shared_buffers, max_wal_size, and min_wal_size are enabled by default. Most of the other settings are commented out in a default PostgreSQL installation, so uncomment them.
shared_buffers = 16GB
work_mem = 128MB
maintenance_work_mem = 1GB
max_parallel_maintenance_workers = 8
wal_level = replica
wal_compression = on
wal_buffers = 16MB
max_wal_size = 8GB
min_wal_size = 1GB
temp_buffers = 128MB
backend_flush_after = 256kB
effective_io_concurrency = 32
maintenance_io_concurrency = 10
max_worker_processes = 16
max_parallel_workers_per_gather = 8
max_parallel_workers = 16
effective_cache_size = 32GB
default_statistics_target = 1000
Step 5: Connect Eyeglass and the ECA cluster to the database
-
On Eyeglass, add the database with the
igls adv sqldb addcommand. Provide the database IP address, port (5432 by default), user name, database name, database type, and password. -
Verify the connection:
igls adv sqldb -
On the ECA master node, add the database with
ecactl db add. The command prompts you for the password. -
If settings do not synchronize, restart the
evtarchiveservices on the ECA cluster.
Security note: The Eyeglass command accepts the password as a command-line argument, which a shell can record in its history. Clear the history after you run it, or avoid a reusable password.
Step 6: Verify the database
-
Connect to the
eyeglassdatabase and list its tables. After the ECA cluster starts sending events, the reports and user events tables exist. -
Confirm the role has permissions on those tables.
-
Confirm PostgreSQL is running:
systemctl status postgresql
Manage retention
Eyeglass can archive old events from the database to cold storage and restore them when you need them.
Configure archive settings
Add these settings to /opt/superna/sca/data/system.xml:
<sendRecordsToColdStoreDays>90</sendRecordsToColdStoreDays>
<coldStoreCompressionLevel>4</coldStoreCompressionLevel>
<coldStorePath>/mnt/eyeglass-archive</coldStorePath>
| Setting | Description | Default |
|---|---|---|
sendRecordsToColdStoreDays | Age in days at which events move to cold storage. | 90 |
coldStoreCompressionLevel | Compression of archive files, from 0 (none) to 9 (highest). | 4 |
coldStorePath | Directory that holds archive files. | /tmp |
Important: Do not leave
coldStorePathat/tmp. Archive files can fill the Eyeglass disk. Mount an NFS export or other large volume on Eyeglass, add it to/etc/fstabso it persists across reboots, and pointcoldStorePathat it. Restart thescaservice after you changesystem.xml.
Schedule or run archiving
The scheduled archive task is disabled by default. To enable it, set IsEnabled="true" for EasyAuditorColdStoreOldRecordsTask in sync.xml. The default schedule is daily at 01:00 (0 1 * * *).
To archive immediately:
igls adv sqldbarchive
Archive files are named by day, for example userEvents_2026_09_15.
Restore archived events
igls adv sqldbrestore set --startDate=2026_09_01 --endDate=2026_09_30
Eyeglass loads archive files in the date range back into the database and deletes the restored archive files after a successful restore.
Logs
| Operation | Log directory |
|---|---|
| Archive | /opt/data/SQLarchive_logs |
| Restore | /opt/data/SQLrestore_logs |
An archive job reports SUCCESS when it processed records or found none, WARNING when it could not delete archive files, and FAILURE when it lacks permission on the cold store folder, the database, or the log directory.