6.12. Event Logger#
The event logger allows query completion events and all related information to be logged into a PostgreSQL database.
- PostgreSQL database with network connectivity from the coordinator
- PostgreSQL JDBC driver JAR copied into
plugin/eventlisteneron all nodes
The event logger is implemented as a event listener implementation and can be enabled by creating a configuration file
etc/event-listener.properties. The name needs to be set to
event-logger. The configuration includes the JDBC connection URL, username
and password for accessing the PostgreSQL database.
event-listener.name=event-logger jdbc.url=jdbc:postgresql://localhost:5432/postgres jdbc.user=test_psql jdbc.password=test12
The user needs to have sufficient rights to create tables and insert data in the configured schema.
For each completed query, a row is created in the
It captures everything that Presto emits – query, user, metadata, stats,
performance related attributes, resource consumption, start time, end time, and
The following columns are populated with the relevant information:
To analyze and query the event log, you can create a catalog with the PostgreSQL connector using the same JDBC connection parameters. This allows you to use the Presto CLI or any other application connected to the catalog to create queries, dashboards, perform ad hoc analysis and more.
Example use cases:
- measure query performance numbers and trends
- understand impact of different cluster configurations
- enable cluster workload management and resource consumption