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

promtail multiline pipeline with kubernetes labels #3820

Closed
Henry-Kim-Youngwoo opened this issue Jun 8, 2021 · 1 comment
Closed

promtail multiline pipeline with kubernetes labels #3820

Henry-Kim-Youngwoo opened this issue Jun 8, 2021 · 1 comment

Comments

@Henry-Kim-Youngwoo
Copy link

currently, I deployed prom-tail on my eks cluster with helm chart

and I use this configuration to use multiline parsing

    - job_name: rtp-server-log
      pipeline_stages:
      - docker: {}
      - multiline:
          firstline: ^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)
          max_lines: 1000
          max_wait_time: 2s
      - replace:
          expression: '(\n)'
          replace: ''
      static_configs:
      - labels:
          __path__: /var/log/pods/asterisk*/asterisk-rtp-server/*.log
          job: rtp-server-log
        targets:
        - localhost
      kubernetes_sd_configs:
      - role: pod
      relabel_configs:
      - action: replace
        source_labels:
        - __meta_kubernetes_namespace
        target_label: namespace
      - action: replace
        source_labels:
        - __meta_kubernetes_pod_name
        target_label: pod
      - action: replace
        source_labels:
        - __meta_kubernetes_pod_container_name
        target_label: container

but when I check the log on grafana explorer there is no label about kubernetes pod metadata

how can i add kubernetes pod info like container name or pod name with multiline parsing?

@dannykopping
Copy link
Contributor

Hi

Please note our questions policy on GitHub below.

You may submit questions in any of the following ways:

NOTE: All questions submitted as issues will be closed.

cyriltovena pushed a commit to cyriltovena/loki that referenced this issue Jun 11, 2021
* chore: remove global logger from the ruler package

Signed-off-by: Jacob Lisi <[email protected]>

* fix rebase issues

Signed-off-by: Jacob Lisi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants