-
QuestionHello I would like to be able to pull metrics from a LibreNMS -> Kafka -> Vector -> Prometheus Exporter With the supplied configuration (and VRL program), I am able to get and transform event into table of metrics. But As I added the I haven't found the expected format that is expected in input for the NB : I was able to expose internal vector metrics with an other prometheus exporter sink (no problem) Here a sample message from the kafka topic (in 1 line) : Vector Configmy |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
Worth trying... restructure your pipeline to use transforms:
my_parse_metrics_id:
type: remap
inputs:
- kafka_metrics_id
source: |
. = parse_json!(.message)
my_metrics_id:
type: log_to_metric
inputs:
- my_parse_metrics_id
metrics:
- type: gauge
field: "fields.ifInOctets_rate"
name: "ifInOctets_rate"
namespace: "{{measurement}}"
tags:
ifName: "{{tags.ifName}}"
hostname: "{{tags.hostname}}"
- type: counter
field: "fields.INOCTETS"
name: "INOCTETS"
namespace: "{{measurement}}"
tags:
ifName: "{{tags.ifName}}"
hostname: "{{tags.hostname}}"
# repeat for each field...
sinks:
my_sink_id:
type: prometheus_exporter
inputs:
- my_metrics_id
address: "0.0.0.0:9598" |
Beta Was this translation helpful? Give feedback.
-
|
Thank you very much... This is really helpful. I have one last hiccup : some value are (Also to further help future people interested in this architecture, I have introduce a lot of |
Beta Was this translation helpful? Give feedback.
If any one needs it, in the case of LibreNMS, I have written this configuration examples : https://github.com/htam-net/LibreNMS2Kafka2Prometheus