Configure logging for an AlloyDB Omni cluster

Select a documentation version:

AlloyDB Omni lets you redirect logs from all data path components, such as the database engine, monitor, or other services, to a dedicated disk mounted on each node. This practice is recommended for production environments to prevent logs from consuming space on the primary data disk and improve observability and debuggability.

Configure log redirection

To enable log redirection, you must define an ObsDisk in your resource specification. For the full DBCluster resource specification file, see Prepare resource specifications. Add the following details to the file:

DBCluster:
  ...
  spec:
    ...
    primarySpec:
      ...
      resources:
        ...
        disks:
          - name: ObsDisk
            path: OBS_DISK_PATH

Replace the following:

  • OBS_DISK_PATH: The file system path in the database host where logs are stored. The ObsDisk must be an external volume individually mounted on all VM nodes provisioned within the Red Hat orchestrator to ensure log persistence and prevent logs from consuming primary data disk space. These external volumes should be sized appropriately to hold logs over a required period of time, ensuring sufficient capacity for observability and troubleshooting.

Log configurations

The following table outlines how each AlloyDB Omni component is deployed and where its logs are generated.

Host group Component File names
primary_instance_nodes AlloyDB Omni alloydbomni.log
primary_instance_nodes AlloyDB Omni monitor alloydbomni_monitor.log
load_balancer_nodes HAProxy haproxy.log
load_balancer_nodes if provided, else primary_instance_nodes keepalived keepalived.log
load_balancer_nodes if provided, else primary_instance_nodes pgBouncer pgbouncer.log

Limitations

  • Logs are collected to the ObsDisk. Transferring or sending the logs to a centralized log server is unsupported.
  • Logs stored in the ObsDisk aren't rotated. You must configure sending logs out of ObsDisk and cleanup space.