Introducing Elephantshark, a tool to monitor Postgres network traffic
Blog post from Neon
Elephantshark, an open-source Ruby script developed by Neon, is designed to monitor and troubleshoot Postgres network traffic by acting as a middleman in Postgres-protocol exchanges. Unlike Wireshark, which struggles with SSL/TLS-encrypted connections, Elephantshark can decrypt and re-encrypt Postgres connections, parsing and logging messages between servers, clients, drivers, ORMs, proxies, and poolers. It facilitates detailed monitoring by forwarding and annotating network traffic, and it can also work alongside Wireshark by writing keys to an SSLKEYLOGFILE. The tool demonstrates its functionality through a step-by-step process of connecting to a Neon Postgres database, showing the detailed exchange of bytes between the client and server, including authentication and parameter statuses. Users can access more information and installation instructions via the README on GitHub.