-
Notifications
You must be signed in to change notification settings - Fork 208
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
Integrate prometheus.exporter
and discovery
components
#1443
Comments
So far I can think of two ways to do this. Option 1: Dynamic pipelinesThis option is being discussed in a dedicated proposal PR. I'm not sure how realistic this option is, because it could become quite a bad footgun. Option 2: A purpose-built component for decorating metrics with labels from SD targetsThe new component would have two types of inputs:
It'd add extra labels to the metrics, and then send the metrics downstream to other |
Ideally we should come up with a solution which can also be reused for Loki components - #810. |
This issue has not had any activity in the past 30 days, so the |
Request
prometheus.exporter
components tend to not taketargets
as "input" attributes. Some do (e.g. prometheus.exporter.snmp and prometheus.exporter.blackbox), but others such as prometheus.exporter.kafka simply have an attribute for the URL of the system they are monitoring (kafka_uris
). It would be nice to leverage thediscovery
components when working withprometheus.exporter
, so that the metrics can have extra labels.The simplest way I can think of is to have an additional argument for every
prometheus.exporter
that takes intargets
. For example,prometheus.exporter.kafka
can have akafka_targets
argument.kafka_targets
must contain a special__address__
label with the Kafka API URL, and it may contain various additional labels which can be passed down toprometheus.scrape
.An alternative approach for
prometheus.exporter.kafka
would be to leave the existingkafka_uris
attribute as the only attribute which can contain Kafka API URLs, and instead we can have some sort ofadditional_labels
attribute. However, it may be harder to associate the right labels with the right kafka instance.Use case
You may want to run
prometheus.exporter
to monitor a Kafka or Redis running on k8s, and you may want k8s labels such as pod name.The text was updated successfully, but these errors were encountered: