问题
I created an export sink in Stackdriver to load audit logs into BigQuery. I want to be able to see audit logs from the past 3 months. However, when I queried the tables in BigQuery, I am only seeing logs from today and no earlier.
I applied the following filters to my export sink. I also tried removing the timestamp filter but still only seeing logs from today and no prior.
resource.type="bigquery_dataset" timestamp > "2019-05-01T23:59:09.739Z"
回答1:
Exports only work for new entries.
Per the documentation -- "exporting happens for new log entries only, you cannot export log entries that Logging received before your sink was created."
https://cloud.google.com/logging/docs/export/#how_sinks_work
来源:https://stackoverflow.com/questions/56940912/why-is-my-export-sink-from-stackdriver-only-loading-the-latest-audit-logs-into-b