kei
kei

Reputation: 78

Is there a way to stream application logs to a different Stackdriver project?

I'm wondering if it's possible to stream application(GKE) logs not only to the StackDriver where the app exists, but to another StackDriver(Different project) at the same time.

Trying to add another fluent-d DaemonSet but don't know where to set any project info in the fluentd-gcp-configmap-old.yaml for the different project .

Thanks

Upvotes: 1

Views: 417

Answers (2)

Igor Peshansky
Igor Peshansky

Reputation: 727

By default, the Stackdriver output plugin for fluentd (out_google_cloud) writes logs into the project that owns the identity (service account) it uses to authenticate. You can override the project id in the agent configuration, as long as the identity has the permission to write logs into the destination project.

Upvotes: 2

Asif Tanwir
Asif Tanwir

Reputation: 119

Stackdriver logging is per project, "The Logs Viewer shows only the logs from one project" [1]. However, you can export [2] copies of some or all of your logs outside of Stackdriver Logging.

[1] https://cloud.google.com/logging/docs/basic-concepts

[2] https://cloud.google.com/logging/docs/export/

Upvotes: 1

Related Questions