Skip to content

Consolidate Multiple Pod Replica Logs into a Single Stream in Loki #16597

Open
@ShadabAkram

Description

@ShadabAkram

We are currently using Promtail to send logs to Loki. Our goal is to consolidate log streams from multiple replicas of the same pod into a single log stream in Loki/Grafana. This means if a pod has multiple replicas (e.g., 3 replicas), we would like only one log stream to be created and visible in Loki, rather than having separate streams for each replica.

Currently, each replica of a pod sends its own log stream to Loki, which results in multiple streams for the same pod if there are multiple replicas.

Desired Behavior: We would like Promtail to be configured such that it consolidates the logs from all replicas of a pod into a single stream. This would make log management more efficient and reduce the clutter in Loki's visualization in Grafana.

We have attempted several workarounds, including custom configurations and created new job in scrapeConfigs: , also tried configuring the extraScrapeConfigs: but none have achieved the desired effect. We are looking for guidance or that could support this functionality.

Thank you!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions