@@ -61,6 +61,41 @@ make integration_test
61
61
62
62
Note the integration tests require Docker, and will take a while to run through.
63
63
64
+ #### Test receiving Postgres logs over syslog
65
+
66
+ The ability to receive Postgres logs over syslog is not covered by
67
+ automated tests. To test this manually, you'll need to relay the
68
+ Postgres logs through a syslog daemon.
69
+
70
+ Here's one way to do that (assuming a locally running Postgres on a
71
+ Debian/Ubuntu system):
72
+
73
+ - ` sudo apt install rsyslog `
74
+ - edit your Postgres config file and set ` log_destination ` to ` syslog `
75
+ - add the following rsyslog configuration file at ` /etc/rsyslog.d/51-postgres.conf ` :
76
+ ```
77
+ if $programname == 'postgres' then {
78
+ *.* action(
79
+ type="omfwd"
80
+ StreamDriver="ptcp"
81
+ StreamDriverMode="0"
82
+ template="RSYSLOG_SyslogProtocol23Format"
83
+ target="localhost" port="5514" protocol="tcp"
84
+ action.resumeRetryCount="100"
85
+ queue.type="linkedList" queue.size="10000"
86
+ )
87
+ }
88
+ ```
89
+ you can pick another port if 5514 is not available
90
+ - ` sudo service rsyslog restart `
91
+ - update your local collector configuration to monitor your local Postgres
92
+ - update the configuration to add ` db_log_syslog_server = 0.0.0.0:5514 `
93
+ (or whatever port you selected above)
94
+ - start the collector
95
+ - run ` SELECT pg_reload_conf() ` in Postgres
96
+
97
+ The collector should now be receiving Postgres logs via rsyslog.
98
+
64
99
### Build the Helm Docs
65
100
66
101
The Helm chart [ ` README.md ` file] ( contrib/helm/pganalyze-collector/README.md ) is
0 commit comments