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

Unable to extract labels from loki sink in vector #22619

Open
surekha3 opened this issue Mar 10, 2025 · 0 comments
Open

Unable to extract labels from loki sink in vector #22619

surekha3 opened this issue Mar 10, 2025 · 0 comments
Labels
sink: loki Anything `loki` sink related type: bug A code related bug.

Comments

@surekha3
Copy link

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

Trying to collect kafka logs using vector latest version and sending to loki. But unable to extract any labels from loglines. when given under labels i.e.,
labels:
env: "{{ env }}"
It's stating function env not found error though it's present within logline. Please help asap. Below is the config used
transforms:
extract_transform:
type: remap
inputs:

  • kafka_logs
    source: |
    .topic = to_string!(.topic)
    . = parse_json!(.message)
    .host = .parsed.tags.host
    sinks:
    loki_sink:
    type: loki
    inputs:
  • extract_transform
    endpoint: http://loki-nob-gateway/
    encoding:
    codec: "json"
    compression: none
    healthcheck: false
    labels:
    job: "kafka"
    topic: "{{ topic }}"
    host: "{{ host }}"

Configuration


Version

0.45.0

Debug Output


Example Data

No response

Additional Context

No response

References

No response

@surekha3 surekha3 added the type: bug A code related bug. label Mar 10, 2025
@pront pront added the sink: loki Anything `loki` sink related label Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sink: loki Anything `loki` sink related type: bug A code related bug.
Projects
None yet
Development

No branches or pull requests

2 participants