Monday, April 19, 2021

[google-cloud-sql-discuss] Re: Audit Log not generating DML statement logs for Cloud-SQL

Hello,

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



On Sunday, April 18, 2021 at 9:19:16 AM UTC-4 Bharath wrote:

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.


--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/50603627-fb95-4c0b-a54b-de40a4b3dacbn%40googlegroups.com.

No comments:

Post a Comment