sinmetal / slide

http://sinmetal-slide.appspot.com/
2 stars 0 forks source link

Organizetion Audit Logを出力する #39

Open sinmetal opened 7 years ago

sinmetal commented 7 years ago

Organizetion単位でLog出力できるようになったっぽいので、試してみよう https://cloudplatform-jp.googleblog.com/2017/09/announcing-new-Stackdriver-Logging-features-and-expanded-free-logs-limits.html

sinmetal commented 7 years ago
gcloud beta logging sinks create organizetion-auditlog-sink bigquery.googleapis.com/projects/logging-sinmetal-org/datasets/auditlog --log-filter='logName= "logs/cloudaudit.googleapis.com%2Factivity"' --organization=69165754818 --include-children

で設定してみたけど、何も出てこないな・・・

sinmetal commented 7 years ago

ログは日次で出力されるらしい。 IAMはどんな感じでいれればいいのか分からないな。

sinmetal commented 7 years ago

commandだと出力されないので、APIで設定を入れてみた

https://developers.google.com/apis-explorer/#search/logging.organizations.sinks.create/m/logging/v2/logging.organizations.sinks.create?parent=organizations%252F69165754818&uniqueWriterIdentity=true&_h=2&resource=%257B%250A++%2522name%2522%253A+%2522audit-log-5%2522%252C%250A++%2522destination%2522%253A+%2522bigquery.googleapis.com%252Fprojects%252Flogging-sinmetal-org%252Fdatasets%252Fauditlog5%2522%252C%250A++%2522filter%2522%253A+%2522logName%253D%255C%2522logs%252Fcloudaudit.googleapis.com%25252Factivity%255C%2522%2522%252C%250A++%2522includeChildren%2522%253A+true%250A%257D&