Pushing data to LGTM stack in k8s from external sources

Hi there.

I have my LGTM stack deployed to Kubernetes and everything works as expected. The next step would be to send logs from an external source to this stack. More precisely, these external sources would run their own Alloy agent so I can send them to LGTM.

The questions:

  • is this the correct/suggested way of doing it?
  • more importantly, to which component should I send the data (logs, metrics, traces)
    • Should I create an Ingress for Alloy or Loki?
    • I would like to have some kind of authentication for the receiver end, so I reduced the exposure.
  • What are the best practices in such a case?

Thanks in advance!

Logs to Loki, metrics to Mimir, if you want traces you’d need Tempo.

You should have ingress for Loki and Mimir, so that Alloy, outside of your K8S cluster, can hit Loki or Miimir.

Loki doesn’t do authentication directly, but you can set auth_enabled to true, which will tell Loki to use tenant, then map some sort of frontend authentication mechanism to tenant ID. The Loki helm chart does this with Nginx, I’d recommend you to take a look at it.

1 Like

Awesome, thanks for the detailed answer. This was let me set it up correctly, really appreciate your help.