Audit Log not generating DML statement logs for Cloud-SQL

229 visualizzazioni
Passa al primo messaggio da leggere

Bharath

da leggere,
18 apr 2021, 09:19:1618/04/21
a Google Cloud SQL discuss

I am trying to display audit logs for Cloud-SQL in the stack-driver-console. I have already enabled audit-log for Cloud-SQL in IAM. 

auditlog_enablement.png

I connect to mysql or postgres databases in Cloud-SQL and when I connect these audit logs are displayed in the console.

Screen Shot 2021-04-16 at 9.15.04 PM.png

request: { @type: "type.googleapis.com/google.cloud.sql.v1beta4.SqlInstancesGetRequest" instance: "testpostgres"

But after this if i perform any operation in that particular database like SELECT or INSERT or DELETE, there is no audit-log (data-access) generated for both mysql and postgres. In mysql instance I have set the following database flags

audit_log ON (this is in beta version)

For mysql if i add 1 more flag **general_log** I am able to get those DML statements but they come under a different log **cloudsql.googleapis.com%2Fmysql-general.log** and don't come under audit-logs

Similarly for post-gres these statements come under a different log:

**cloudsql.googleapis.com%2Fpostgres.log**

I am new to this Cloud-SQL so not aware of the logging implemented there. Why no audit logs are generated when any DML is done for the particular database in that Cloud-SQL instance and should I set any other flag for this purpose? Can anyone please help?

Thanks.


David (Cloud Platform Support)

da leggere,
19 apr 2021, 15:42:2219/04/21
a Google Cloud SQL discuss

Hello,

I see you have asked this on Stackoverflow and gotten a response from us. Please continue the interaction within the Stackoverflow post.

Rispondi a tutti
Rispondi all'autore
Inoltra
0 nuovi messaggi