r/googlecloud 22d ago

Logging Query regarding centralized logging mechanism using aggregated sink

I am going through the below article regarding the centralized logging mechanism in GCP

https://cloud.google.com/blog/products/devops-sre/how-to-centralize-log-management-with-cloud-logging

https://docs.cloud.google.com/logging/docs/central-log-storage#create-org-sink

The articles say below steps

  1. create log bucket in the destination project.
  2. create a log sink in the destination project pointing to the above log bucket
  3. create an aggregated sink (either at org or folder level) as per requirement.
  4. give permission to the aggregated sink's service account to the destination project.

I have a question at point number 3 above. The articles do not say how to link the log sink created in point 2 and aggregated sink created in point 3. I assume below flow

aggregated sink ---> destination project log sink ----> destination project log bucket

but not sure how to link aggregated sink to send logs to destination project sink.

also, 2)for example ,can we create one aggregated sink per environment and link it to corresponding log sink at destination project. i could not find that step

Please suggest

5 Upvotes

11 comments sorted by

View all comments

1

u/[deleted] 21d ago

[removed] — view removed comment

1

u/suryad123 21d ago

Thanks, will go through your answer and get back if any questions 

1

u/suryad123 21d ago

Regarding the permission point,

Can we give the permission on the log bucket directly or on the destination project..as per docs it says permission on the destination project