-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Logger PGAudit not working, postgres logger is used instead #4386
Comments
seems that there is a problem when adding these two options in the config When disabling them i get the correct logoutput with pgaudit as logger { |
I think we don't handle the rows, that's why |
This patch ensures the correct parsing of the additional `rows` field returned when the `pgaudit.log_rows` option is enabled. Previously, the presence of this field caused audit logs to be incorrectly routed to the normal log stream. Closes #4386 Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com> Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com> (cherry picked from commit fb7d2f2)
This patch ensures the correct parsing of the additional `rows` field returned when the `pgaudit.log_rows` option is enabled. Previously, the presence of this field caused audit logs to be incorrectly routed to the normal log stream. Closes #4386 Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com> Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com> (cherry picked from commit fb7d2f2)
This patch ensures the correct parsing of the additional `rows` field returned when the `pgaudit.log_rows` option is enabled. Previously, the presence of this field caused audit logs to be incorrectly routed to the normal log stream. Closes #4386 Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com> Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com> (cherry picked from commit fb7d2f2)
Is there an existing issue already for this bug?
I have read the troubleshooting guide
I am running a supported version of CloudNativePG
Contact Details
No response
Version
1.23.0
What version of Kubernetes are you using?
1.28
What is your Kubernetes environment?
Cloud: Google GKE
How did you install the operator?
Helm
What happened?
{
"level": "info",
"ts": "2024-04-26T10:55:22+02:00",
"logger": "postgres",
"msg": "record",
"logging_pod": "autpgc16dbms01-development-1",
"record": {
"log_time": "2024-04-26 10:55:22.428 CEST",
"user_name": "postgres",
"database_name": "postgres",
"process_id": "5024",
"connection_from": "[local]",
"session_id": "662b6bfa.13a0",
"session_line_num": "5",
"command_tag": "SET",
"session_start_time": "2024-04-26 10:55:22 CEST",
"virtual_transaction_id": "4/1471",
"transaction_id": "0",
"error_severity": "LOG",
"sql_state_code": "00000",
"message": "AUDIT: SESSION,2,1,MISC,SET,,,SET application_name TO cnpg_metrics_exporter,,0",
"application_name": "cnpg_metrics_exporter",
"backend_type": "client backend",
"query_id": "-5293235264903128716"
}
}
The documentation states the fact that pgaudit extension will use the pgaudit logger
Cluster resource
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: