Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loki.process forwarding to multiple components blocks all destinations if one is blocked #2194

Open
claytonpeters opened this issue Nov 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@claytonpeters
Copy link

What's wrong?

We have a loki.process component in our setup which for testing we had set to forward_to multiple endpoints as we needed K8s logs to go to multiple places. When one of the loki.write components in this block was unable to send on metrics (because the server it was sending to was temporarily unavailable), we noted that the other components that loki.process was forwarding on to also stopped receiving logs.

Steps to reproduce

  • Setup alloy to take a Loki source (for example from Kubernetes pod logs, i.e. loki.source.kubernetes)
  • Have a loki.process component take those logs and forward them on to multiple write end points (a loki.write, and at least one other)
  • Take down the destination server for one of those write loki.write end points so that the logs fail to deliver
  • All destinations will now stop receiving logs

System information

Linux 5.15.0-122

Software version

Grafana Alloy v1.4.2

Configuration

discovery.kubernetes "pods" {
  role = "pod"
}
discovery.relabel "pods_logs" {
  targets = discovery.kubernetes.pods.targets
  rule {
    source_labels = ["__meta_kubernetes_namespace"]
    action        = "replace"
    target_label  = "namespace"
  }
  // ..etc..
}
loki.source.kubernetes "pods_logs" {
  targets    = discovery.relabel.pods_logs.output
  forward_to = [loki.process.pods_logs.receiver]
  clustering {
    enabled = true
  }
}
loki.process "pods_logs" {
  stage.static_labels {
    values = {
      cluster = "cluster-name",
    }
  }
  forward_to = [
    loki.write.default.receiver,
    loki.write.second_test.receiver,
  ]
}
loki.write "default" {
  endpoint {
    url       = "http://default-loki-endpoint:3100/loki/api/v1/push"
    tenant_id = "public"
  }
}
loki.write "second_test" {
  endpoint {
    url       = "http://second-loki-endpoint:3100/loki/api/v1/push"
    tenant_id = "public"
  }
}

Logs


@claytonpeters claytonpeters added the bug Something isn't working label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant