Page MenuHomePhabricator

Export maps postgres logs to logstash
Open, Needs TriagePublic

Description

In order to debug replication errors, it would be helpful if we were archiving postgres logs from the maps replica nodes, in our searchable backend.

Event Timeline

Do we have to wait for an upgrade to PostgreSQL 15 in order to get JSON logging that can be picked up by logstash? https://www.postgresql.org/docs/current/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-JSONLOG Otherwise we could work around with an extension like https://github.com/michaelpq/pg_plugins/tree/main/jsonlog

If we can't emit json logs, it seems there are connectors for flat logging, https://wikitech.wikimedia.org/wiki/Logstash/Interface

I'm not sure Data-Persistence team is a good fit for this. We don't own the PG instance.

Change 853941 had a related patch set uploaded (by Awight; author: Awight):

[operations/puppet@production] Send PostgreSQL logs to logstash

https://gerrit.wikimedia.org/r/853941

awight moved this task from Doing to Tech Review on the WMDE-TechWish-Sprint-2022-10-26 board.

Change 853941 abandoned by Awight:

[operations/puppet@production] Send PostgreSQL logs to logstash

Reason:

This was just a POC.

https://gerrit.wikimedia.org/r/853941