observIQ / stanza-plugins

stanza-plugins contains plugins for the Stanza Log Agent
Apache License 2.0
10 stars 7 forks source link

Update Postgressql to gain parity with google #397

Closed Mrod1598 closed 2 years ago

Mrod1598 commented 2 years ago

Example Log:

2022-02-17 21:07:07.829 UTC [5529] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-02-17 21:07:07.835 UTC [5530] LOG:  database system was shut down at 2022-02-17 21:07:07 UTC
2022-02-17 21:07:07.841 UTC [5529] LOG:  database system is ready to accept connections

Example output:

{"timestamp":"2022-02-17T21:07:07.841Z","severity":0,"labels":{"file_name":"example.log","log_type":"postgresql.general","plugin_id":"postgresql"},"record":{"level":"LOG","message":"database system is ready to accept connections","role":"","tid":"5529","user":""}}
{"timestamp":"2022-02-17T21:07:07.829Z","severity":0,"labels":{"file_name":"example.log","log_type":"postgresql.general","plugin_id":"postgresql"},"record":{"level":"LOG","message":"listening on Unix socket \"/var/run/postgresql/.s.PGSQL.5432\"","role":"","tid":"5529","user":""}}
{"timestamp":"2022-02-17T21:07:07.835Z","severity":0,"labels":{"file_name":"example.log","log_type":"postgresql.general","plugin_id":"postgresql"},"record":{"level":"LOG","message":"database system was shut down at 2022-02-17 21:07:07 UTC","role":"","tid":"5530","user":""}}