Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Can Vector processing metrics data from Kafka to Prometheus directly #18918

Closed
u-kyou opened this issue Oct 24, 2023 · 1 comment
Closed

Can Vector processing metrics data from Kafka to Prometheus directly #18918

u-kyou opened this issue Oct 24, 2023 · 1 comment
Labels
type: bug A code related bug.

Comments

@u-kyou
Copy link

u-kyou commented Oct 24, 2023

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

I am trying to find a tool which can support:
prometheus -(1)-> kafka -(2)-> VictoriaMetrics

(1) prometheus -vector-> kafka Succeed
vector's prometheus_remote_write source and kafka sink help me send data from prometheus to kafka already. The data in kafka is like:
{"name":"up","tags":{"instance":"10.32.140.2:9090","job":"prometheus","usage":"test-vector"},"timestamp":"2023-10-24T11:27:07.024Z","kind":"absolute","gauge":{"value":1.0}}

(2) kafka --> VictoriaMetrics Failed
I got error when I use kafka source and prometheus_remote_write sink:
ERROR vector::cli: Configuration error. error=Data type mismatch between prome_kafka_in (Log) and out_to_prome (Metric)

I noticed that there is a transform named log_to_metric. I tried but it did not work as expected.

Configuration

[sources.prome_kafka_in]
type = "kafka"
bootstrap_servers = "kafka_addr:9092"
topics = ["sre_prometheus_remote_write"]
group_id ="vector_prome_kafka"

#[transforms.log_to_metric]
#type = "log_to_metric"
#inputs = [ "prome_kafka_in" ]
#
#  [[transforms.log_to_metric.metrics]]
#  field = "gauge.value"
#  name = "up"
#  type = "gauge"

[sinks.out_to_prome]
type = "prometheus_remote_write"
inputs = [ "prome_kafka_in" ]
endpoint = "http://remote_write_addr"

Version

timberio/vector:0.33.0-debian

Debug Output

No response

Example Data

No response

Additional Context

No response

References

No response

@u-kyou u-kyou added the type: bug A code related bug. label Oct 24, 2023
@jszwedko
Copy link
Member

Hi @Felix-YuJing . This seems more like a question than a bug report so I'll convert it to a GitHub Discussion.

@vectordotdev vectordotdev locked and limited conversation to collaborators Oct 24, 2023
@jszwedko jszwedko converted this issue into discussion #18920 Oct 24, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
type: bug A code related bug.
Projects
None yet
Development

No branches or pull requests

2 participants