Migrate logs from Stackdriver to Grafana Loki

191 Views Asked by At

I am planning on migrating from Stackdriver as it is costly and the logs management isn't that clear, therefore I am going to implement Loki (Canary+Loki+Grafana).

My question is:

How do I migrate my logs from Stackdriver to Loki? Do I need to implement a shipping tool to collect the logs and send them to Grafana Loki?

If that's the case, please provide me with advices regarding this matter :))

Environment:

Kubernetes: 1.21.14-gke.4300

1

There are 1 best solutions below

0
Abhijith Chitrapu On

You need to implement a log shipping tool to collect logs from your kubernetes cluster and send them to loki. Use a Fluentd log collector which can forward to loki.

You can configure Fluentd to pull logs from Stackdriver; it has a plugin for Stackdriver which will collect logs and forward them to the other destinations. Now configure Fluentd to push logs to loki and it also has a plugin for Loki that can forward logs. You need to configure it with the Loki endpoint and credentials. For Loke please check the official page for plugins and more information.

There are many other tools like Fluentd where you can search it on Google.com. If your complexity is more you can use Google Cloud Operation Suite where you can integrate more for managing logs and metrics.