anti-social / json-exporter

Prometheus metrics exporter for any json metrics that are provided by elasticsearch or kafka-manager
3 stars 1 forks source link

Cli dsl for endpoint urls #1

Open anti-social opened 3 years ago

anti-social commented 3 years ago

Motivation:

Original elasticsearch exporter has some options to control endpoints:

When you specify those options the exporter can enable corresponding endpoint and configure its url.

Description

We also should have those endpoints are configured but are disabled by default.

At the moment it is possible to form an endpoint url from predefined parts:

- id: nodes
  url: local?groups
  url_parts:
    paths:
      local: /_nodes/_local/stats
      all: /_nodes/stats
    params:
      groups:
        name: groups
        value: _all

In this case local?groups will form /_nodes/_local/stats?group=_all url.

We can override url using --endpoint-url option:

What should be implemented:

Consider how that DSL might look like.

Use nom to parse DSL.

trkohler commented 3 years ago

may i take a look on this one? I can' t promise it will be fast tho

anti-social commented 3 years ago

may i take a look on this one?

Surely