Re: [PATCH] MINOR: contrib/prometheus-exporter: allow to select the exported metrics

2019-11-22 Thread William Dauchy
On Fri, Nov 22, 2019 at 11:25:44AM +0100, Christopher Faulet wrote: > URI delimiters must not be encoded, except if you want to escape it. So, > your first url is not equivalent to the second one. The encoded question > mark is part of the path in the first url, it is not the query-string >

Re: [PATCH] MINOR: contrib/prometheus-exporter: allow to select the exported metrics

2019-11-22 Thread Christopher Faulet
Le 21/11/2019 à 16:54, William Dauchy a écrit : Hi Christopher, On Tue, Nov 19, 2019 at 04:35:47PM +0100, Christopher Faulet wrote: +/* Parse the query stirng of request URI to filter the metrics. It returns 1 on + * success and -1 on error. */ +static int promex_parse_uri(struct appctx

Re: [PATCH] MINOR: contrib/prometheus-exporter: allow to select the exported metrics

2019-11-21 Thread William Dauchy
Hi Christopher, On Tue, Nov 19, 2019 at 04:35:47PM +0100, Christopher Faulet wrote: > +/* Parse the query stirng of request URI to filter the metrics. It returns 1 > on > + * success and -1 on error. */ > +static int promex_parse_uri(struct appctx *appctx, struct stream_interface > *si) > +{ >

Re: [PATCH] MINOR: contrib/prometheus-exporter: allow to select the exported metrics

2019-11-21 Thread Илья Шипицин
чт, 21 нояб. 2019 г. в 15:18, William Dauchy : > On Thu, Nov 21, 2019 at 03:09:30PM +0500, Илья Шипицин wrote: > > I understand. However, those patches add complexity (which might be moved > > to another dedicated tool) > > those patch makes sense for heavy haproxy instances. As you might have >

Re: [PATCH] MINOR: contrib/prometheus-exporter: allow to select the exported metrics

2019-11-21 Thread William Dauchy
On Thu, Nov 21, 2019 at 03:09:30PM +0500, Илья Шипицин wrote: > I understand. However, those patches add complexity (which might be moved > to another dedicated tool) those patch makes sense for heavy haproxy instances. As you might have seen above, we are talking about > 130MB of data. So for a

Re: [PATCH] MINOR: contrib/prometheus-exporter: allow to select the exported metrics

2019-11-21 Thread Илья Шипицин
чт, 21 нояб. 2019 г. в 15:07, William Dauchy : > On Thu, Nov 21, 2019 at 03:00:02PM +0500, Илья Шипицин wrote: > > is it common thing in Prometheus world to perform cascade export ? like > > "exporter" --> "filter out" --> "aggregate" --> "deliver to prometheus" > > in order to keep things simple

Re: [PATCH] MINOR: contrib/prometheus-exporter: allow to select the exported metrics

2019-11-21 Thread William Dauchy
On Thu, Nov 21, 2019 at 03:00:02PM +0500, Илья Шипицин wrote: > is it common thing in Prometheus world to perform cascade export ? like > "exporter" --> "filter out" --> "aggregate" --> "deliver to prometheus" > in order to keep things simple and not to push everything into single tool no, the

Re: [PATCH] MINOR: contrib/prometheus-exporter: allow to select the exported metrics

2019-11-21 Thread Илья Шипицин
btw, side question... is it common thing in Prometheus world to perform cascade export ? like "exporter" --> "filter out" --> "aggregate" --> "deliver to prometheus" in order to keep things simple and not to push everything into single tool чт, 21 нояб. 2019 г. в 14:49, Christopher Faulet : >

Re: [PATCH] MINOR: contrib/prometheus-exporter: allow to select the exported metrics

2019-11-21 Thread Christopher Faulet
Le 20/11/2019 à 21:23, William Dauchy a écrit : Hi Christopher, On Wed, Nov 20, 2019 at 02:56:28PM +0100, Christopher Faulet wrote: Nice, Thanks for your feedback. It is merged now. And I'm on the backports for the 2.0. You apparently forgot to backport commit 0d1c2a65e8370a770d01 (MINOR:

Re: [PATCH] MINOR: contrib/prometheus-exporter: allow to select the exported metrics

2019-11-20 Thread William Dauchy
Hi Christopher, On Wed, Nov 20, 2019 at 02:56:28PM +0100, Christopher Faulet wrote: > Nice, Thanks for your feedback. It is merged now. And I'm on the backports > for the 2.0. You apparently forgot to backport commit 0d1c2a65e8370a770d01 (MINOR: stats: Report max times in addition of the

Re: [PATCH] MINOR: contrib/prometheus-exporter: allow to select the exported metrics

2019-11-20 Thread Christopher Faulet
Le 20/11/2019 à 13:03, William Dauchy a écrit : On Tue, Nov 19, 2019 at 04:35:47PM +0100, Christopher Faulet wrote: Here is updated patches with the support for "scope" and "no-maint" parameters. If this solution is good enough for you (and if it works :), I will push it. $ curl

Re: [PATCH] MINOR: contrib/prometheus-exporter: allow to select the exported metrics

2019-11-20 Thread William Dauchy
On Tue, Nov 19, 2019 at 04:35:47PM +0100, Christopher Faulet wrote: > Here is updated patches with the support for "scope" and "no-maint" > parameters. If this solution is good enough for you (and if it works :), I > will push it. $ curl

Re: [PATCH] MINOR: contrib/prometheus-exporter: allow to select the exported metrics

2019-11-19 Thread William Dauchy
Hi Christopher, On Tue, Nov 19, 2019 at 04:35:47PM +0100, Christopher Faulet wrote: > Here is updated patches with the support for "scope" and "no-maint" > parameters. If this solution is good enough for you (and if it works :), I > will push it. this looks good to me and the test was conclusive

Re: [PATCH] MINOR: contrib/prometheus-exporter: allow to select the exported metrics

2019-11-19 Thread Christopher Faulet
Le 19/11/2019 à 14:51, Christopher Faulet a écrit : Regarding the problem of servers in maintenance, since we parse the query-string, it is possible to add more filters. I may add a parameter to filter out servers in maintenance. For instance, by passing "no-maint" in the query-string, all

Re: [PATCH] MINOR: contrib/prometheus-exporter: allow to select the exported metrics

2019-11-19 Thread Christopher Faulet
Hi William, I missed Pierre's email. I'm CCing him. Le 18/11/2019 à 21:00, William Dauchy a écrit : Thanks. Having a way to filter metrics in the Prometheus exporter was on my todo-list :) Filtering on scopes is pretty simple and it is a good start to solve performance issues for huge configs.

Re: [PATCH] MINOR: contrib/prometheus-exporter: allow to select the exported metrics

2019-11-18 Thread William Dauchy
Hello Christopher, Thank you for your quick answer. On Mon, Nov 18, 2019 at 04:28:37PM +0100, Christopher Faulet wrote: > Thanks. Having a way to filter metrics in the Prometheus exporter was on my > todo-list :) Filtering on scopes is pretty simple and it is a good start to > solve performance

Re: [PATCH] MINOR: contrib/prometheus-exporter: allow to select the exported metrics

2019-11-18 Thread Christopher Faulet
Le 16/11/2019 à 21:02, William Dauchy a écrit : this patch is an attempt to permit parameters on the prometheus exporter configuration: global, frontend, backend, listener, server. This allows to avoid exporting metrics you don't necessary use. The filtering can also be done on prometheus

[PATCH] MINOR: contrib/prometheus-exporter: allow to select the exported metrics

2019-11-16 Thread William Dauchy
this patch is an attempt to permit parameters on the prometheus exporter configuration: global, frontend, backend, listener, server. This allows to avoid exporting metrics you don't necessary use. The filtering can also be done on prometheus scraping configuration, but general aim is to optimise