How to collect in a table from a PostgreSQL database
To collect log events from a PostgreSQL database audit table, the following prerequisits must be met:
- The user has permission to read the audit table;
- Having Server IP and port;
- Having an audit table structure, including Database name and table name;
- Editing the sql query as follows, using the table structure chosen:
select
to_char("TimestampColumn",'YYYY-MM-DD HH24:MI:SS.US') as LocalTime,
"Column1",
"Column2",
"Column3",
"Column4",
"Column5",
"Column6",
"Column7",
"Column8",
"Column9",
"Column10"
from DataBaseName."AuditTableName"
where "TimestampColumn" > TO_TIMESTAMP('$LastDateTime$', 'YYYY/MM/DD HH24:MI:SS.US')
order by "TimestampColumn"