Hi there,
I wanted to confirm the manner we access metrics via the sarama library and go-metrics.
Considering as an example the Broker related metrics we should have two types of metrics ( meter and histogram ).
Could you please confirm that for: Accessing meter values
( example "incoming-byte-rate" ) inside Fetch() i should proceed like:
Hi there,
my intent was to extend the kafka module for metricbeat. I would like to confirm the correct way to access the sarama metrics ( used in the kafka module ).
Given the metrics you proposed, I thought you wanted to collect metrics from the kafka output in metricbeat.
The kafka module in metricbeat only uses some of the low-level API in order to query kafka for some information (the broker type from samara only). A module in metricbeat is supposed to query an external service. The kafka module in metricbeat is not supposed to collect internal metrics. Especially, with the metricbeat module not connecting to the full cluster, but one host only.
Hi there,
so what should be the correct approach to collect for example the "request-size" histogram metric from the sarama broker?
kind regards,
Filipe
TBH I don't really understand what exactly you want to do. Without really understanding what you intend to do I have a hard time to make any recommendations. But let me try.
The metricbeat kafka module does not use any of the sarama metrics.
Can you add a link to the code you want to insert your custom metrics?
Do I understand you right that you want to add your own metrics to this kafka module in metricbeat?
How/when do you want to report these metrics?
You plan to add the internal metrics to the partition and consumergroup metricset?
Metricbeat polls kafka for some stats, depending on the configured period. Do you plan to collect metrics for every 'run' or do you plan to collect these metrics for the lifetime of metrictbeat? In this case, which event do you want to attach these information? The kafka protocol kind of batches up requests for multiple topics/partitions into one request, still metricbeat will report multiple events.
Metricbeat wraps the broker. The NewBroker function creates a sarama config object. One normally passes a metrics registry to the config object. The config object is reused on Connect. The broker is closed after every run. Depending on use-case one could:
create a shared registry and reuse it for all active modules/metricsets
create a a local registry per broker, but keep it for all runs
pass a registry to Connect, so to have a new registry on every run.
If you use your own custom metrics registry, it will not be processed by metricbeat. You are responsible for adding the processing at the end of a run.
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.