Hi, i'm using metricbeat 7.10.1 and i want to get data with prometheus module(golang prometheus client) and send data to kafka output.
Here's my yaml file.
and here is problem.
My return data contains { and }, so when i use output.kafka, data seperated and metricbeat send data to kafka several times.
Is there any way to escape these { and } ?
Hi @jsoriano, yes!! i got three events in my case.
Two with label, and one without label.
I just want to send my prometheus data to kafka in one events, by escaping {} characters.
Is it possible?
now, too many events created(twelve kafka events per one prometheus request)
No, this is not possible with current implementation.
Metrics with different labels are sent in different events so it is possible to filter metrics with the same labels. E.g. in this case you may want to show a graph with the values of promhttp_metric_handler_requests_total per status code. For that the query needs to group by prometheus.labels.code.
I see that with a different implementation that escapes the labels you could have something like promhttp_metric_handler_requests_total_code_500 and promhttp_metric_handler_requests_total_code_503, and for this case it could work well as you could query for the specific codes you are interested.
But this approach poses some problems in other cases:
What to do for metrics that have more than one label.
Each label can have many values, using them as part of the metric name would lead to fields explosion in the index mapping.
Is this producing some problem? Take into account that by having this many (smaller) events your metrics are stored in a format that is more convenient for indexing and querying.
Thank you very much for your kind reply.
I understood what you say.
In fact, the reason why i wanted this feature is that we are no need to query based on labels.
So i just little uncomfortable that too many events per one prometheus request make many duplicate data and take large amount of storage.
But now i realized there is no way to make one events per one promethues in Beats.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.