Re: http-request return bytes_read from v2.3 to v2.4

2021-07-26 Thread William Dauchy
On Mon, Jul 26, 2021 at 8:35 AM Christopher Faulet wrote: > The response size reported in the log messages is related to the internal > representation of the HTTP message. It is a limitation of the current design. > It > means this size is not equal to the raw size of the message and may change

http-request return bytes_read from v2.3 to v2.4

2021-07-25 Thread William Dauchy
Hello, While upgrading from v2.3.x to v2.4.x I noticed a difference of bytes read in requests http logs with this simple frontend config: frontend foo bind 127.0.0.1:8000 http-request return in v2.3, the logs (%B) tells me 54 bytes, in v2.4, I am getting 49. So a difference of 5

Re: [ANNOUNCE] haproxy-2.4.0

2021-05-26 Thread William Dauchy
On Fri, May 14, 2021 at 11:58 AM Willy Tarreau wrote: > - interoperability / protocol support: WebSocket over HTTP/2 (RFC8441) > is now supported on both sides, regardless of the version on the other > side. The cache now supports the "Vary" header with a few commonly > used

Re: [ANNOUNCE] haproxy-2.3.9

2021-03-31 Thread William Dauchy
On Tue, Mar 30, 2021 at 6:59 PM Willy Tarreau wrote: > HAProxy 2.3.9 was released on 2021/03/30. It added 5 new commits > after version 2.3.8. > > This essentially fixes the rate counters issue that popped up in 2.3.8 > after the previous fix for the rate counters already. > > What happened is

Re: Table sticky counters decrementation problem

2021-03-30 Thread William Dauchy
On Tue, Mar 30, 2021 at 5:57 PM Willy Tarreau wrote: > out of curiosity I wanted to check when the overflow happened: > > $ date --date=@$$(date +%s) * 1000) & -0x800) / 1000)) > Mon Mar 29 23:59:46 CEST 2021 > > So it only affects processes started since today. I'm quite tempted not > to

Re: "[ANNOUNCE] haproxy-2.3.6

2021-03-05 Thread William Dauchy
Hi, On Wed, Mar 3, 2021 at 4:09 PM Christopher Faulet wrote: >- An issue leading to possible infinite loops because of a double locking > effect in the mt lists was fixed by Olivier. If MT_LIST_TRY_ADDQ() > macro, it was possible to try to lock twice the same element, making the >

[PATCH] BUG/MEDIUM: contrib/prometheus-exporter: fix segfault in listener name dump

2021-02-24 Thread William Dauchy
596c90 in main (argc=, argv=0x7fffe818) at src/haproxy.c:3723 quit) this bug was introduced by commit e3f7bd5ae9e969cbfe87e4130d06bff7a3e814c6 ("MEDIUM: contrib/prometheus-exporter: add listen stats"), which is present for 2.4 only, so no backport needed. Signed-of

[PATCH 2/3] REGTESTS: contrib/prometheus-exporter: test NaN values

2021-02-18 Thread William Dauchy
In order to make sure we detect when we change default behaviour for some metrics, test the NaN value when it is expected. Those metrics were listed since our last rework as their default value changed, unless the appropriate config is set. Signed-off-by: William Dauchy --- reg-tests/contrib

[PATCH 1/3] DOC: contrib/prometheus-exporter: remove htx reference

2021-02-18 Thread William Dauchy
now that htx is the default everywhere, we can remove the need to put htx as a mandatory option to setup prometheus. Signed-off-by: William Dauchy --- contrib/prometheus-exporter/README | 1 - 1 file changed, 1 deletion(-) diff --git a/contrib/prometheus-exporter/README b/contrib/prometheus

[PATCH 3/3] REGTESTS: contrib/prometheus-exporter: test well known labels

2021-02-18 Thread William Dauchy
as we previously briefly broke labels handling, test them to make sure we don't introduce regressions in the future. see also commit 040b1195f70d6a24204ede081451fd1dd71e6a34 ("BUG/MINOR: contrib/prometheus-exporter: Restart labels dump at the right pos") for reference Signed-off-b

[PATCH] MINOR: cli: add missing agent commands for set server

2021-02-15 Thread William Dauchy
we previously forgot to add `agent-*` commands. Take this opportunity to rewrite the help string in a simpler way for readability (mainly removing simple quotes) Signed-off-by: William Dauchy --- src/server.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src

[PATCH 2/3] MINOR: stats: add helper to get status string

2021-02-14 Thread William Dauchy
move listen status to a helper, defining both status enum and string definition. this will be helpful to be reused in prometheus code. It also removes this hard-to-read nested ternary. Signed-off-by: William Dauchy --- include/haproxy/listener-t.h | 9 + include/haproxy/listener.h

[PATCH 1/3] MEDIUM: stats: allow to select one field in `stats_fill_li_stats`

2021-02-14 Thread William Dauchy
. >From this patch it should be possible to add support for listen stats in prometheus. Signed-off-by: William Dauchy --- include/haproxy/stats.h | 2 +- src/hlua_fcn.c | 3 +- src/stats.c | 166 +++- 3 files changed, 116 insertions(+),

[PATCH 0/3] prometheus: add listen stats

2021-02-14 Thread William Dauchy
Hello Christopher, I know I'm a bit late regarding the merge window; this is however the logical followup of my prometheus work, now adding listen stats. patch 2/3 is a proposition but I'm ok to revisit. William Dauchy (3): MEDIUM: stats: allow to select one field in `stats_fill_li_stats

[PATCH 3/3] MEDIUM: contrib/prometheus-exporter: add listen stats

2021-02-14 Thread William Dauchy
this was a missing piece for a while now even though it was planned. This patch adds listen stats. Nothing in particular but we make use of the status helper previously added. `promex_st_metrics` diff also looks scary, but I had to realign all lines. Signed-off-by: William Dauchy --- contrib

[PATCH 2/2] CLEANUP: contrib/prometheus-exporter: align for with srv status case

2021-02-14 Thread William Dauchy
the for loop was wrongly indented following our recent rework Signed-off-by: William Dauchy --- contrib/prometheus-exporter/service-prometheus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/prometheus-exporter/service-prometheus.c b/contrib/prometheus-exporter

[PATCH 1/2] CLEANUP: check: fix get_check_status_info declaration

2021-02-14 Thread William Dauchy
we always put a \n between function name and `{` Signed-off-by: William Dauchy --- src/check.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/check.c b/src/check.c index d37a55201..d17f747fe 100644 --- a/src/check.c +++ b/src/check.c @@ -178,8 +178,8 @@ const char

[PATCH] DOC: tune: explain the origin of block size for ssl.cachesize

2021-02-12 Thread William Dauchy
A user could eventually ask himself where those 200 bytes block size are coming from. This patch tries to better explain the origin in case people are curious or want to double check the reality. Signed-off-by: William Dauchy --- doc/configuration.txt | 21 +++-- 1 file changed

Re: [PATCH v3 0/5] cli commands for checks and agent

2021-02-12 Thread William Dauchy
On Fri, Feb 12, 2021 at 3:06 PM Christopher Faulet wrote: > I just slightly amended the 3rd patch to handle the v2 in > apply_server_state(). > There is a test on the version when a state-file is local to a proxy. Just a > minor change. ok, thanks for that. > And in the last one, I removed the

Re: stats / "show servers conn" looses counter after reload

2021-02-12 Thread William Dauchy
Hi Christian, On Fri, Feb 12, 2021 at 11:59 AM Christian Ruppert wrote: > Is this a bug? Can you confirm this behavior? Is there any other way I > could figure out whether a backend is currently in use? unfortunately reload does not recover stats values; it is a known problem; see also

[PATCH v3 4/5] MEDIUM: server: support {check,agent}_addr, agent_port in server state

2021-02-11 Thread William Dauchy
logical followup from cli commands addition, so that the state server file stays compatible with the changes made at runtime; use previously added helper to load server attributes. also alloc a specific chunk to avoid mixing with other called functions using it Signed-off-by: William Dauchy

[PATCH v3 1/5] MEDIUM: cli: add check-addr command

2021-02-11 Thread William Dauchy
Signed-off-by: William Dauchy --- doc/management.txt | 4 ++ src/server.c | 95 ++ 2 files changed, 84 insertions(+), 15 deletions(-) diff --git a/doc/management.txt b/doc/management.txt index b74aba769..bff770e4e 100644 --- a/doc/management.txt

[PATCH v3 5/5] MINOR: server: enhance error precision when applying server state

2021-02-11 Thread William Dauchy
was already present with SRV resolution though. I was a bit puzzled about the approach to take to be honest, and I did not wanted to go into a full refactor, so I assumed it was ok to simply notify whether the line was failed or partially applied. Signed-off-by: William Dauchy --- src/server.c | 10

[PATCH v3 3/5] MEDIUM: server: add server-states version 2

2021-02-11 Thread William Dauchy
apart from: - introduce v2 where it is needed (parsing, update) - move away from switch/case in update to be able to reuse code - move srv lock to the whole function to make it easier this patch confirm how painful it is to maintain this functionality. Signed-off-by: William Dauchy --- include

[PATCH v3 2/5] MEDIUM: cli: add agent-port command

2021-02-11 Thread William Dauchy
. Signed-off-by: William Dauchy --- doc/management.txt | 6 +++- src/server.c | 84 +- 2 files changed, 80 insertions(+), 10 deletions(-) diff --git a/doc/management.txt b/doc/management.txt index bff770e4e..423c614b2 100644 --- a/doc/management.txt

[PATCH v3 0/5] cli commands for checks and agent

2021-02-11 Thread William Dauchy
ution, in the middle of srv port, where it is harder to have a kinda generic way to know where we stopped. William Dauchy (5): MEDIUM: cli: add check-addr command MEDIUM: cli: add agent-port command MEDIUM: server: add server-states version 2 MEDIUM: server: support {check,agent}_addr,

Re: [PATCH v2 0/6] cli commands for checks and agent

2021-02-10 Thread William Dauchy
On Wed, Feb 10, 2021 at 4:21 PM Christopher Faulet wrote: > To conclude, I may merge the first 4 patches if you want, but I guess you > will have to adapt the first ones to produce better warnings. So I will > wait your confirmation to proceed. However, I will merge the bug fix. > There is no

Re: [PATCH v2 3/6] BUG/MEDIUM: server: re-align state file fields number

2021-02-08 Thread William Dauchy
Hello Christopher, On Mon, Feb 8, 2021 at 11:53 PM William Dauchy wrote: > Since commit 3169471964fdc49963e63f68c1fd88686821a0c4 ("MINOR: Add > server port field to server state file.") max_fields was not increased > on version number 1. So this patch aims to fix it. This sho

[PATCH v2 4/6] MEDIUM: server: add server-states version 2

2021-02-08 Thread William Dauchy
apart from: - introduce v2 where it is needed (parsing, update) - move away from switch/case in update to be able to reuse code - move srv lock to the whole function to make it easier this patch confirm how painful it is to maintain this functionality. Signed-off-by: William Dauchy --- include

[PATCH v2 5/6] MEDIUM: server: support {check,agent}_addr, agent_port in server state

2021-02-08 Thread William Dauchy
logical followup from cli commands addition, so that the state server file stays compatible with the changes made at runtime; use previously added helper to load server attributes. also alloc a specific chunk to avoid mixing with other called functions using it Signed-off-by: William Dauchy

[PATCH v2 6/6] CLEANUP: server: add missing space in server-state error output

2021-02-08 Thread William Dauchy
a space was missing in the output to make it more readable. Signed-off-by: William Dauchy --- src/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 6b360291d..673844dd7 100644 --- a/src/server.c +++ b/src/server.c @@ -3015,7 +3015,7

[PATCH v2 3/6] BUG/MINOR: server: re-align state file fields number

2021-02-08 Thread William Dauchy
he version: simply increase the field by 1. Signed-off-by: William Dauchy --- include/haproxy/server-t.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/haproxy/server-t.h b/include/haproxy/server-t.h index 32697a9c4..af52b6a25 100644 --- a/include/haproxy/server-t.h +++

[PATCH v2 2/6] MEDIUM: cli: add agent-port command

2021-02-08 Thread William Dauchy
. Signed-off-by: William Dauchy --- doc/management.txt | 6 +++- src/server.c | 76 -- 2 files changed, 72 insertions(+), 10 deletions(-) diff --git a/doc/management.txt b/doc/management.txt index bff770e4e..423c614b2 100644 --- a/doc/management.txt

[PATCH v2 1/6] MEDIUM: cli: add check-addr command

2021-02-08 Thread William Dauchy
Signed-off-by: William Dauchy --- doc/management.txt | 4 +++ src/server.c | 87 ++ 2 files changed, 76 insertions(+), 15 deletions(-) diff --git a/doc/management.txt b/doc/management.txt index b74aba769..bff770e4e 100644 --- a/doc/management.txt

[PATCH v2 3/6] BUG/MEDIUM: server: re-align state file fields number

2021-02-08 Thread William Dauchy
he version: simply increase the field by 1. Signed-off-by: William Dauchy --- include/haproxy/server-t.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/haproxy/server-t.h b/include/haproxy/server-t.h index 32697a9c4..af52b6a25 100644 --- a/include/haproxy/server-t.h +++

[PATCH v2 0/6] cli commands for checks and agent

2021-02-08 Thread William Dauchy
this will be good enough, but otherwise, don't hesitate to put more comments, I will come back with a v3. William Dauchy (6): MEDIUM: cli: add check-addr command MEDIUM: cli: add agent-port command BUG/MEDIUM: server: re-align state file fields number MEDIUM: server: add server-states version 2 MEDIUM

Re: [PATCH 0/6] cli commands coherency

2021-02-08 Thread William Dauchy
Hi Christopher, On Mon, Feb 8, 2021 at 12:21 PM Christopher Faulet wrote: > First, there is a test to be sure the agent-check is enabled before updating > the > agent address and/or port. Do you think it should also be done for the > health-check? Because, for now, it is possible to set an

Re: [ANNOUNCE] haproxy-2.4-dev7

2021-02-07 Thread William Dauchy
On Fri, Feb 5, 2021 at 4:14 PM Willy Tarreau wrote: > HAProxy 2.4-dev7 was released on 2021/02/05. It added 153 new commits > after version 2.4-dev6. > - Some significant lifting was done to the Prometheus exporter, including > new fields, better descriptions and some filtering. I've seen

[PATCH 2/2] MEDIUM: contrib/prometheus-exporter: export base stick table stats

2021-02-07 Thread William Dauchy
-by: William Dauchy --- contrib/prometheus-exporter/README| 10 ++ .../prometheus-exporter/service-prometheus.c | 148 +++--- reg-tests/contrib/prometheus.vtc | 4 + 3 files changed, 142 insertions(+), 20 deletions(-) diff --git a/contrib/prometheus-exporter

[PATCH 1/2] MINOR: contrib/prometheus-exporter: use stats desc when possible followup

2021-02-07 Thread William Dauchy
em at some point, but who knows what happened. Signed-off-by: William Dauchy --- .../prometheus-exporter/service-prometheus.c | 35 --- 1 file changed, 35 deletions(-) diff --git a/contrib/prometheus-exporter/service-prometheus.c b/contrib/prometheus-exporter/service-promethe

[PATCH 2/6] CLEANUP: tools: typo in `strl2irc` mention

2021-02-06 Thread William Dauchy
`str2irc` does not exist Signed-off-by: William Dauchy --- src/tools.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools.c b/src/tools.c index 8fef15b4d..2d40d8910 100644 --- a/src/tools.c +++ b/src/tools.c @@ -2178,7 +2178,7 @@ int strl2irc(const char *s, int len

[PATCH 5/6] MEDIUM: server: support {check,agent}_addr, agent_port in server state

2021-02-06 Thread William Dauchy
logical followup from cli commands addition, so that the state server file stays compatible with the changes made at runtime; use previously added helper to load server attributes. Signed-off-by: William Dauchy --- doc/management.txt| 5 ++- include/haproxy/server

[PATCH 4/6] MEDIUM: cli: add agent-port command

2021-02-06 Thread William Dauchy
. Signed-off-by: William Dauchy --- doc/management.txt | 6 +++- src/server.c | 77 -- 2 files changed, 73 insertions(+), 10 deletions(-) diff --git a/doc/management.txt b/doc/management.txt index bff770e4e..423c614b2 100644 --- a/doc/management.txt

[PATCH 0/6] cli commands coherency

2021-02-06 Thread William Dauchy
Hello, This is a followup from last week cleaning regarding check and agent check. This patch series brings some more coherency on the CLI side. I also put some minor cleaning. William Dauchy (6): CLEANUP: check: fix some typo in comments CLEANUP: tools: typo in `strl2irc` mention MEDIUM

[PATCH 1/6] CLEANUP: check: fix some typo in comments

2021-02-06 Thread William Dauchy
a few obvious english typo in comments, some of which introduced by myself quite recently Signed-off-by: William Dauchy --- src/check.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/check.c b/src/check.c index edb2ac29f..5de867d7f 100644 --- a/src

[PATCH 6/6] CLEANUP: server: add missing space in server-state error output

2021-02-06 Thread William Dauchy
a space was missing in the output to make it more readable. Signed-off-by: William Dauchy --- src/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 42191eda5..33375e638 100644 --- a/src/server.c +++ b/src/server.c @@ -3017,7 +3017,7

[PATCH 3/6] MEDIUM: cli: add check-addr command

2021-02-06 Thread William Dauchy
for people having a consul like architecture: - the backend server is located on a container with its own IP - the health checks are done the consul instance located on the host with the host IP Signed-off-by: William Dauchy --- doc/management.txt | 4 +++ src/server.c | 83

Re: [PATCH v3 0/5] fix check port/addr consistency

2021-02-04 Thread William Dauchy
Hello Christopher, Thanks for your continuous support on this review :) On Thu, Feb 4, 2021 at 10:09 AM Christopher Faulet wrote: > Thanks William, it seems good. I've just a question (sorry :). When the server > state file is loaded, why the check port is set only if there is a DNS >

[PATCH v3 5/5] MEDIUM: check: align agentaddr and agentport behaviour

2021-02-03 Thread William Dauchy
between `addr` and `port` more consistent. Signed-off-by: William Dauchy --- doc/configuration.txt | 10 +- include/haproxy/check.h| 1 + include/haproxy/server-t.h | 1 + src/check.c| 12 +++- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git

[PATCH v3 3/5] MEDIUM: check: remove checkport checkaddr flag

2021-02-03 Thread William Dauchy
, it means it was never set by the user or config. Signed-off-by: William Dauchy --- include/haproxy/server-t.h | 2 -- src/check.c| 2 -- src/dns.c | 3 +-- src/server.c | 7 ++- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/include

[PATCH v3 0/5] fix check port/addr consistency

2021-02-03 Thread William Dauchy
Hello Christopher, Here is my last update on port/addr consistency. I addressed all the point you mentioned. I hope I did not forgot anything. I will come back with `check-addr` and `agent-port` on the cli once those patches are accepted. William Dauchy (5): BUG/MINOR: cli: fix set server

[PATCH v3 1/5] BUG/MINOR: cli: fix set server addr/port coherency with health checks

2021-02-03 Thread William Dauchy
o a change of behavior along the years. So this patch can potentially be backported up to v1.8 but we must be careful while doing so, as the code has changed a lot. That being said, the bug being not very impacting I would be fine keeping it for 2.4 only. Signed-off-by: William Dauchy --- src/ser

[PATCH v3 4/5] BUG/MINOR: check: consitent way to set agentaddr

2021-02-03 Thread William Dauchy
stable version where the agent is supported. Signed-off-by: William Dauchy --- include/haproxy/check.h | 1 + src/check.c | 19 +++ src/server.c| 7 ++- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/include/haproxy/check.h b/include

[PATCH v3 2/5] MEDIUM: server: adding support for check_port in server state

2021-02-03 Thread William Dauchy
by config. I am fully aware this is not making github #953 moving forward, I however think this might be acceptable while waiting for a proper solution and resolve consistency problem faced with port settings. Signed-off-by: William Dauchy --- doc/management.txt| 1

Re: [PATCH v2 0/5] fix check port/addr consistency

2021-02-03 Thread William Dauchy
On Wed, Feb 3, 2021 at 9:59 AM Christopher Faulet wrote: > At first glance, I'm just a bit annoyed with the patch 5. In the > documentation, > it is stated that "addr" option will be used for agent-check too. And there is > no info about interactions between "addr" and "agent-addr" options when

Re: [PATCH v2 4/5] MEDIUM: get rid of checkaddr and agentaddr flag

2021-02-02 Thread William Dauchy
On Tue, Feb 2, 2021 at 10:57 PM William Dauchy wrote: > in the same manner of checkport flag, we found out some consistency > problem. For instance, SRV_F_AGENTADDR flag is set when the "addr" > option is set on a server line but not for the "agent-addr" option. >

[PATCH v2 4/5] MEDIUM: get rid of checkaddr and agentaddr flag

2021-02-02 Thread William Dauchy
quence of this patch is that agentaddr is no longer used, at least for now. We might reintroduced it later if we need it. Signed-off-by: William Dauchy --- include/haproxy/server-t.h | 2 -- src/check.c| 2 -- 2 files changed, 4 deletions(-) diff --git a/include/haproxy/server-t.h b/in

[PATCH v2 2/5] MEDIUM: server: adding support for check_port in server state

2021-02-02 Thread William Dauchy
by config. I am fully aware this is not making github #953 moving forward, I however think this might be acceptable while waiting for a proper solution and resolve consistency problem faced with port settings. Signed-off-by: William Dauchy --- doc/management.txt| 1

[PATCH v2 3/5] MEDIUM: server: get rid of checkport flag

2021-02-02 Thread William Dauchy
, it means it was never set by the user, regardless if it is by the cli or config file. In the longterm this will avoid to introduce a new consistency issue if we forget to set the flag. Signed-off-by: William Dauchy --- include/haproxy/server-t.h | 1 - src/check.c| 1 - src/dns.c

[PATCH v2 0/5] fix check port/addr consistency

2021-02-02 Thread William Dauchy
a setup with containers having their own IP, but with a health check on the host (e.g. on the consul side for example). So it becomes more and more needed. That's mostly why I wanted to clarify the situation first with the different things I've seen while revisting this part of the code. William

[PATCH v2 5/5] BUG/MINOR: server: don't set agent addr for addr parsing

2021-02-02 Thread William Dauchy
to determine where this issue is coming from. So it is probable we may backport it to all stable version where the agent is supported. Signed-off-by: William Dauchy --- src/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/check.c b/src/check.c index f4d5bd452..aab86dc8c

[PATCH v2 1/5] BUG/MINOR: cli: fix set server addr/port coherency with health checks

2021-02-02 Thread William Dauchy
o a change of behavior along the years. So this patch can potentially be backported up to v1.8 but we must be careful while doing so, as the code has changed a lot. That being said, the bug being not very impacting I would be fine keeping it for 2.4 only. Signed-off-by: William Dauchy --- src/ser

Re: [PATCH 1/2] BUG/MINOR: cli: fix set server addr/port coherency with health checks

2021-02-02 Thread William Dauchy
Hi Christopher, Thanks for the review. On Tue, Feb 2, 2021 at 10:21 AM Christopher Faulet wrote: > So, it may be good to take a global look at this stuff. I may missed > something. > And be carefull for the backports because the health-checks were refactored in > the 2.2. ok I will come back

Re: [PATCH 1/9] MAJOR: contrib/prometheus-exporter: move health check status to labels

2021-02-01 Thread William Dauchy
On Mon, Feb 1, 2021 at 12:05 PM Pierre Cheynier wrote: > In addition to this update, I would add some recommendations about the user > setup in the README ("how do I prevent my prometheus instance to explode > when scrapping this endpoint?"). > For server-template users: > - > params: >

Re: [PATCH 0/9] prometheus: health check as labels + cleanup

2021-02-01 Thread William Dauchy
On Mon, Feb 01, 2021 at 11:30:18AM +0100, Christopher Faulet wrote: > Don't be sorry to send patches ! If you think the number of labels for the > check_status metric is not a problem, even for huge configurations, I trust > you. > And I guess we can reduce this number to 16 status only, removing

[PATCH 1/2] BUG/MINOR: cli: fix set server addr/port coherency with health checks

2021-02-01 Thread William Dauchy
o a change of behavior along the years. So this patch can potentially be backported up to v1.8. Signed-off-by: William Dauchy --- src/server.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/src/server.c b/src/server.c index 10f528640..99b7e9181 100644 --- a/src/server.c +++ b/sr

[PATCH 2/2] BUG/MINOR: cli: set server check-port missing flag

2021-02-01 Thread William Dauchy
Signed-off-by: William Dauchy --- src/server.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server.c b/src/server.c index 99b7e9181..ded3d47ff 100644 --- a/src/server.c +++ b/src/server.c @@ -4405,6 +4405,7 @@ static int cli_parse_set_server(char **args, char *payload, struct app

[PATCH 9/9] CLEANUP: contrib/prometheus-exporter: align and reorder fields

2021-01-30 Thread William Dauchy
nfo fields as comment Signed-off-by: William Dauchy --- contrib/prometheus-exporter/service-prometheus.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/contrib/prometheus-exporter/service-prometheus.c b/contrib/prometheus-exporter/service-prometheus.c index 98f6fca62.

[PATCH 7/9] MINOR: contrib/prometheus-exporter: add recv logs_logs_total field

2021-01-30 Thread William Dauchy
this field was added by commit 45c457a62941a7c4a86ce4327d7755edcd4b230e ("MINOR: log: adds counters on received syslog messages.") Signed-off-by: William Dauchy --- contrib/prometheus-exporter/service-prometheus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/prometheu

[PATCH 8/9] CLEANUP: contrib/prometheus-exporter: remove unused includes

2021-01-30 Thread William Dauchy
unless I'm wrong, those includes are no longer needed. The only recent one I remember is ssl-sock include since commit 5d9b8f3c9347a1a10b86f81d70b22c3cab0e6925 ("MINOR: contrib/prometheus-exporter: use fill_info for process dump") where we make use of the code from stats.c Signed-off-b

[PATCH 5/9] MINOR: contrib/prometheus-exporter: use stats desc when possible

2021-01-30 Thread William Dauchy
will avoid duplicating work between stats.c and prometheus. Signed-off-by: William Dauchy --- .../prometheus-exporter/service-prometheus.c | 107 ++ 1 file changed, 10 insertions(+), 97 deletions(-) diff --git a/contrib/prometheus-exporter/service-prometheus.c b/contrib/

[PATCH 6/9] MINOR: contrib/prometheus-exporter: add uweight field

2021-01-30 Thread William Dauchy
this field was added in commit bd7151002437af1a034a9fdbb582b3cbef5a78d1 ("MINOR: stats: report server's user-configured weight next to effective weight") Signed-off-by: William Dauchy --- contrib/prometheus-exporter/service-prometheus.c | 1 + 1 file changed, 1 insertion(+)

[PATCH 4/9] MINOR: stats: improve max stats descriptions

2021-01-30 Thread William Dauchy
-by: William Dauchy --- src/stats.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/stats.c b/src/stats.c index fdb8e9adf..6fa59a9ef 100644 --- a/src/stats.c +++ b/src/stats.c @@ -160,8 +160,8 @@ const struct name_desc stat_fields[ST_F_TOTAL_FIELDS

[PATCH 3/9] MINOR: stats: improve pending connections description

2021-01-30 Thread William Dauchy
cur and max pending connections description Signed-off-by: William Dauchy --- include/haproxy/counters-t.h | 2 +- src/stats.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/haproxy/counters-t.h b/include/haproxy/counters-t.h index b896c4d36

[PATCH 1/9] MAJOR: contrib/prometheus-exporter: move health check status to labels

2021-01-30 Thread William Dauchy
y consumed on client side not too high. So I believe we should eventually continue in that direction and offer more granularity of filtering of the output. That being said it is already possible to filter out the data on prometheus client side. this is related to github issue #10

[PATCH 2/9] MINOR: contrib/prometheus-exporter: improve service status description field

2021-01-30 Thread William Dauchy
Since we changed the behaviour of this metric, improve the description to better explain what is the meaning of the new gauge value; it also reflects the description we did for health check status. Signed-off-by: William Dauchy --- contrib/prometheus-exporter/service-prometheus.c | 2 +- 1 file

[PATCH 0/9] prometheus: health check as labels + cleanup

2021-01-30 Thread William Dauchy
forgetting adding those fields in the future, but I assume it is ok for now to simply come back with a sane result. The postive point is I did not had to add description and implementation, as we make use of stats.c William Dauchy (9): MAJOR: contrib/prometheus-exporter: move health check

Re: lua function core.get_info() broken in haproxy 2.2.7

2021-01-30 Thread William Dauchy
Hi James, On Sat, Jan 30, 2021 at 3:07 AM James Brown wrote: > Ah, never mind, I see that this was already fixed in master in > 3ddec3ee7d344112b4e4fbde317f8886a20d66a0. yeah, sorry about that. This will be fixed in v2.2.8 and v2.3.4 -- William

Re: Makefile, environment variables and REGTESTS_TYPES

2021-01-29 Thread William Dauchy
On Fri, Jan 29, 2021 at 2:46 PM William Lallemand wrote: > According to `make reg-tests-help` the REGTESTS_TYPES parameter must be > configured as an environment variable and not a make argument. > However since patch 3bad3d5 ("BUILD: Makefile: exclude broken tests by > default"), it does not

[PATCH v2 3/4] MEDIUM: stats: allow to select one field in `stats_fill_sv_stats`

2021-01-25 Thread William Dauchy
per `stats_fill_be_stats_computestate`. - all ST_F*TIME fields requires some minor compute, so I moved it at te beginning of the function under a condition. Signed-off-by: William Dauchy --- include/haproxy/stats.h | 2 +- src/hlua_fcn.c | 3 +- src/stats.c |

[PATCH v2 2/4] MINOR: contrib/prometheus-exporter: use fill_be_stats for backend dump

2021-01-25 Thread William Dauchy
mit 7344f4789321ef8ce2ce17cf73dabd672f7c8c6 ("MINOR: stats: only report backend's down time if it has servers"). The end result is a NaN instead of a zero when no server are present. Signed-off-by: William Dauchy --- .../prometheus-exporter/service-prometheus.c | 163 ++ 1 file changed, 15 inser

[PATCH v2 4/4] MINOR: contrib/prometheus-exporter: use fill_sv_stats for server dump

2021-01-25 Thread William Dauchy
haproxy_server_current_throttle haproxy_server_idle_connections_limit depending on cases, if the limit was not configured or enabled, NaN is returned instead. It should not be an issue for users, even better than before as it provides more precise info. Signed-off-by: William Dauchy --- .../prometheus

[PATCH v2 1/4] MEDIUM: stats: allow to select one field in `stats_fill_be_stats`

2021-01-25 Thread William Dauchy
per `stats_fill_be_stats_computesrv`. - all ST_F*TIME fields requires some minor compute, so I moved it at te beginning of the function under a condition. Signed-off-by: William Dauchy --- include/haproxy/stats.h | 3 +- src/hlua_fcn.c | 2 +- src/stats.c |

Re: [PATCH 5/6] MEDIUM: stats: allow to select one field in `stats_fill_sv_stats`

2021-01-25 Thread William Dauchy
Hello Christopher, Thanks for the review. On Mon, Jan 25, 2021 at 4:33 PM Christopher Faulet wrote: > The "via" parameter is unused. No reason to pass it. good catch. surprised gcc did not triggered it fixed in v2 > Same comment than for stats_fill_b_stats. The metric variable must be >

Re: [PATCH 3/6] MEDIUM: stats: allow to select one field in `stats_fill_be_stats`

2021-01-25 Thread William Dauchy
Hi Christopher, Thanks for the review. On Mon, Jan 25, 2021 at 4:26 PM Christopher Faulet wrote: > Here, you must take care to increment "*nbup" and "*nbsrv" in the for loop. > But > changing it this way gcc then complains these variables are now unused. Thus > to > make it happy, I must use

[PATCH 6/6] MINOR: contrib/prometheus-exporter: use fill_sv_stats for server dump

2021-01-22 Thread William Dauchy
haproxy_server_current_throttle haproxy_server_idle_connections_limit depending on cases, if the limit was not configured or enabled, NaN is returned instead. It should not be an issue for users, even better than before as it provides more precise info. Signed-off-by: William Dauchy --- .../prometheus

[PATCH 5/6] MEDIUM: stats: allow to select one field in `stats_fill_sv_stats`

2021-01-22 Thread William Dauchy
per `stats_fill_be_stats_computestate`. - all ST_F*TIME fields requires some minor compute, so I moved it at te beginning of the function under a condition. Signed-off-by: William Dauchy --- include/haproxy/stats.h | 2 +- src/hlua_fcn.c | 3 +- src/stats.c |

[PATCH 3/6] MEDIUM: stats: allow to select one field in `stats_fill_be_stats`

2021-01-22 Thread William Dauchy
per `stats_fill_be_stats_computesrv`. - all ST_F*TIME fields requires some minor compute, so I moved it at te beginning of the function under a condition. Signed-off-by: William Dauchy --- include/haproxy/stats.h | 3 +- src/hlua_fcn.c | 2 +- src/stats.c |

[PATCH 2/6] CLEANUP: stats: improve field selection for frontend http fields

2021-01-22 Thread William Dauchy
-by: William Dauchy --- include/haproxy/stats.h | 2 +- src/stats.c | 45 + 2 files changed, 19 insertions(+), 28 deletions(-) diff --git a/include/haproxy/stats.h b/include/haproxy/stats.h index eb72446ae..8210367ac 100644 --- a/include/haproxy

[PATCH 4/6] MINOR: contrib/prometheus-exporter: use fill_be_stats for backend dump

2021-01-22 Thread William Dauchy
mit 7344f4789321ef8ce2ce17cf73dabd672f7c8c6 ("MINOR: stats: only report backend's down time if it has servers"). The end result is a NaN instead of a zero when no server are present. Signed-off-by: William Dauchy --- .../prometheus-exporter/service-prometheus.c | 163 ++ 1 file changed, 15 inser

[PATCH 0/6] backend and server stats reuse

2021-01-22 Thread William Dauchy
things in queue: - an attempt to better reuse already existing description on stats.c - first attempt to adapt labels with state and health check but I prefer merging things along the way to avoid huge reviews. William Dauchy (6): MINOR: contrib/prometheus-exporter: better output of Not-a-Number

[PATCH 1/6] MINOR: contrib/prometheus-exporter: better output of Not-a-Number

2021-01-22 Thread William Dauchy
Not necessarily mandatory but I saw a few prometheus client parsing only `NaN`. Also most librarries do output `NaN` Signed-off-by: William Dauchy --- contrib/prometheus-exporter/service-prometheus.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/prometheus

Re: [PATCH] Prometheus: Simplify metrics matrices definition

2021-01-21 Thread William Dauchy
Hey Christopher, On Wed, Jan 20, 2021 at 7:45 PM Willy Tarreau wrote: > > I will continue my work once you have merged this series. > Great, I'll let you guys deal with this together :-) sorry to be a bit impatient but is it possible to push those things so I can continue? :-) Best, --

Re: [PATCH 0/3] prometheus info fields description merge

2021-01-21 Thread William Dauchy
On Thu, Jan 21, 2021 at 9:39 AM Willy Tarreau wrote: > I didn't understand that it was a question. Well, as I mentioned previously, > we could have units stored in the stats structure so that the promex code > automatically performs the conversion. This would make everything more > homogenous I

Re: [PATCH 0/3] prometheus info fields description merge

2021-01-21 Thread William Dauchy
On Wed, Jan 20, 2021 at 4:33 PM William Dauchy wrote: > On Wed, Jan 20, 2021 at 4:08 PM Christopher Faulet > wrote: > > Sorry for the delay. I reviewed your patches and that seems good for me. In > > fact, I was first a bit annoyed by the first one, because it adds 3 new &

Re: [PATCH] Prometheus: Simplify metrics matrices definition

2021-01-20 Thread William Dauchy
On Wed, Jan 20, 2021 at 07:35:11PM +0100, William Dauchy wrote: > I have not tested them but from what I see it should really much change I meant "it should not" ;) > the current output, even the order. That being said, it looks definitely > simpler to me. > I will continue

Re: [PATCH] Prometheus: Simplify metrics matrices definition

2021-01-20 Thread William Dauchy
bels > are initialized to an empty ist. definitely a good cleaning I also had in mind. Reviewed-by: William Dauchy > From c53078675bab24fbefcbfa1f7ad8f8c95bd04d72 Mon Sep 17 00:00:00 2001 > From: Christopher Faulet > Date: Wed, 20 Jan 2021 15:02:50 +0100 > Subject: [PATCH 2/4] MIN

Re: [PATCH 0/2] prometheus cleaning: fill_fe_stats for frontend

2021-01-20 Thread William Dauchy
On Wed, Jan 20, 2021 at 4:18 PM Christopher Faulet wrote: > It's ok for me this way. I guess now you want to do the same for the backends > and the servers :) yes was definitely waiting for a first validation of the approach to continue. Thanks, -- William

Re: [PATCH 0/3] prometheus info fields description merge

2021-01-20 Thread William Dauchy
Thanks Christopher. On Wed, Jan 20, 2021 at 4:08 PM Christopher Faulet wrote: > Sorry for the delay. I reviewed your patches and that seems good for me. In > fact, I was first a bit annoyed by the first one, because it adds 3 new fields > just to change the unit (MB vs bytes). But the unit

Re: [PATCH] DOC: replace use of HA-Proxy with HAProxy

2021-01-18 Thread William Dauchy
On Mon, Jan 18, 2021 at 6:35 AM John Traweek CCNA, Sec+ wrote: > How do I unsubscribe? send an email to haproxy+unsubscr...@formilux.org -- William

  1   2   3   4   >