Open anti-social opened 3 years ago
Motivation:
Original elasticsearch exporter has some options to control endpoints:
es.all
es.cluster_settings
es.indices
es.shards
es.indices_settings
es.snapshots
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.
local?groups
/_nodes/_local/stats?group=_all
We can override url using --endpoint-url option:
--endpoint-url
--endpoint-url nodes:all
/_nodes/stats?groups=_all
--endpoint-url 'nodes:all?'
/_nodes/stats
What should be implemented:
nodes:-
nodes:+
nodes:?-groups
Consider how that DSL might look like.
Use nom to parse DSL.
may i take a look on this one? I can' t promise it will be fast tho
may i take a look on this one?
Surely
Motivation:
Original elasticsearch exporter has some options to control endpoints:
es.all
- if true, query stats for all nodes in the clusteres.cluster_settings
- if true, query stats for cluster settingses.indices
- if true, query stats for all indices in the clusteres.shards
- if true, query stats for all indices in the cluster, including shard-level statses.indices_settings
- if true, query settings stats for all indices in the clusteres.snapshots
- if true, query stats for the cluster snapshotsWhen 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:
In this case
local?groups
will form/_nodes/_local/stats?group=_all
url.We can override url using
--endpoint-url
option:--endpoint-url nodes:all
will produce/_nodes/stats?groups=_all
--endpoint-url 'nodes:all?'
-/_nodes/stats
What should be implemented:
nodes:-
nodes:+
nodes:?-groups
Consider how that DSL might look like.
Use nom to parse DSL.