LOG_ROTATE_EVENTS

Lists the rotation events from do_logrotate_local.

Lists the rotation events from DO_LOGROTATE_LOCAL.

Column Name Data Type Description
NODE_NAME VARCHAR The name of the node from which logs were rotated.
SUCCESS BOOLEAN Whether the call to DO_LOGROTATE_LOCAL succeeded.
MAX_SIZE INTEGER The size, in bytes, set for LogRotateMaxSize.
MAX_AGE INTEGER The age, in days, set for LogRotateMaxAge.
LOG_FILE VARCHAR The path of the original log file.
NEED_ROTATION BOOLEAN Whether the LOG_FILE needed to be rotated.
MESSAGE VARCHAR The actions performed by DO_LOGROTATE_LOCAL for LOG_FILE.

Example

To view all successful rotation events:

=> SELECT * FROM log_rotate_events WHERE need_rotation='t' AND success='t';
-[ RECORD 1 ]-+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------
node_name     | v_vmart_node0001
success       | t
max_size      | 104857600
max_age       | 7
log_file      | /scratch_b/VMart/v_vmart_node0001_catalog/vertica.log
need_rotation | t
message       | /scratch_b/VMart/v_vmart_node0001_catalog/vertica.log was rotated to /scratch_b/VMart/v_vmart_node0001_catalog/vertica.log.2023-12-08-15-18-26-965729-05.gz due to force rotation
-[ RECORD 2 ]-+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------
node_name     | v_vmart_node0001
success       | t
max_size      | 104857600
max_age       | 7
log_file      | /scratch_b/VMart/v_vmart_node0001_catalog/UDxLogs/UDxFencedProcesses.log
need_rotation | t
message       | /scratch_b/VMart/v_vmart_node0001_catalog/UDxLogs/UDxFencedProcesses.log was rotated to /scratch_b/VMart/v_vmart_node0001_catalog/UDxLogs/UDxFencedProcesses.log.2023-12-15-13-18-27-23141-05.gz due to force rotation