line / promgen

Promgen is a configuration file generator for Prometheus
https://line.github.io/promgen/
MIT License
1.06k stars 150 forks source link

[QUESTION] Prometheus Parameter #346

Open vabene1111 opened 3 years ago

vabene1111 commented 3 years ago

I have a multi target exporter which is controlled via the params config directive.

I could not find a way to pass my parameters to the target using promgen. Do i just manually add them to the URL/metrics path ?

I am relatively new to prometheus and still trying to understand promgen as well so i hope i haven't missed anything.

example from https://prometheus.io/docs/guides/multi-target-exporter/#configuring-modules

- job_name: blackbox-http # To get metrics about the exporter’s targets
  metrics_path: /probe
  params:
    module: [http_2xx]
    target: [prometheus.io]
  static_configs:
    - targets:
      - localhost:9115

thanks for the help

vabene1111 commented 3 years ago

i tried adding it to the metrics path directly but that gets encoded by prometheus removing the ? as described here

kfdm commented 3 years ago

Currently Promgen does not support the path parameter. It's something I would like to support, but recently I have been occupied with other tasks 🙇

vabene1111 commented 3 years ago

ok thanks for the information 👍