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

Need Clarification on Protobuf, Kafka and Prometheus interaction #174

Closed
liam-hogan opened this issue Jun 20, 2022 · 2 comments
Closed

Need Clarification on Protobuf, Kafka and Prometheus interaction #174

liam-hogan opened this issue Jun 20, 2022 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@liam-hogan
Copy link

Hello,

Apologies in advance, I was unable to access the slack linked in the bug report menu. I am trying to connect Kafka to a Prometheus instance and I am confused on how index mapping works surrounding Protobuf.

From the guide:

SINK_PROM_METRIC_NAME_PROTO_INDEX_MAPPING

The mapping of fields and the corresponding proto index which will be set as the metric name on Cortex. This is a JSON field.

Example value: {"2":"tip_amount","1":"feedback_ratings"}
Proto field value with index 2 will be stored as metric named tip_amount in Cortex and so on
Type: required

Would "tip_amount" be a record header? Can firehose handle Kafka messages with variable record list lengths?

Thank you,
Liam

@ravisuhag ravisuhag added the question Further information is requested label Jun 20, 2022
@jesrypandawa
Copy link
Contributor

Hi @liamhoganIBM,

Prometheus sink on firehose is not purposed for connecting from Kafka to Prometheus instances directly, since Prometheus is pull-based. So Prometheus sink on firehose is purposed to push the events from Kafka to TimeSeries database, eg:cortex. The events from Kafka will be parsed to prometheus exposition format

example:

metric_name{label_name1=label_value1, label_name2=value2} metric_value

From the example config on guideline section,
if SINK_PROM_METRIC_NAME_PROTO_INDEX_MAPPING set to {"2":"tip_amount","1":"feedback_ratings"}, there will be two metric names stored in tsdb.

tip_amount <tip_amount_value>
feedback_ratings <feedback_ratings_value>

@ravisuhag
Copy link
Member

Closing because of inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants