Re: [PATCH 0/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2017-03-13 Thread Simon Horman
Hi Willy, this patchset seems to have stalled. I'd like to find a way to revive it. On Sun, Jan 08, 2017 at 11:52:46AM +0100, Simon Horman wrote: > Hi Willy, > > On Sun, Jan 08, 2017 at 07:37:24AM +0100, Willy Tarreau wrote: > > Hi Simon, > > > > On Wed, Jan 04,

Re: [PATCH 0/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2017-01-12 Thread Simon Horman
; } > }, > { > "field": { > "name": "Version", > "pos": 1 > }, > "processNum": 1, > "tags": { > "nature": "Output"

Re: [PATCH 0/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2017-01-12 Thread Simon Horman
On Thu, Jan 12, 2017 at 01:27:37PM +, Scott McKeown wrote: > Hi Simon, > > Output below: ... Thanks > On 12 January 2017 at 13:23, Simon Horman wrote: > > > Hi Scott, > > > > could you send the output of the following? > > > > echo &qu

Re: [PATCH 0/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2017-01-12 Thread Simon Horman
I'm running with your config file now. > > Anything else that I can try or detail you would like to make sure its not > me? > > > ~Scott > > > > On 9 January 2017 at 16:13, Scott McKeown wrote: > > > No problem I'll have another look tom

Re: [PATCH 0/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2017-01-09 Thread Simon Horman
Hi Scott, thanks for testing. For reference the code I am using is here: https://github.com/horms/haproxy.git show-json And my minimal config file is as follows. Would it be possible for you to share you config with me (privately) ? global daemon stats socket /tmp/haproxy.stat

Re: [PATCH 0/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2017-01-08 Thread Simon Horman
Hi Willy, On Sun, Jan 08, 2017 at 07:37:24AM +0100, Willy Tarreau wrote: > Hi Simon, > > On Wed, Jan 04, 2017 at 09:37:24AM +0100, Simon Horman wrote: > > Hi, > > > > this short series is an RFC implementation of adding JSON format > > output to show (info|stat

[PATCH 1/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2017-01-04 Thread Simon Horman
outines to only insert a "," between elements when needed. I would value any feedback on how this might be done better. Signed-off-by: Simon Horman --- For the simple configuration below a comparison of the size of info and stats output is as follows: $ show stat =>

[PATCH 0/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2017-01-04 Thread Simon Horman
first patch * Possible automatic generation of (part) of schema in 2nd patch * Improved documentation Some discussion of the size of JSON output is included as an appendix to the changelog of the first patch. Changes since RFC noted in per-patch changelogs. Simon Horman (2): MEDIUM: stats: Add

[PATCH 2/2] MEDIUM: stats: Add show json schema

2017-01-04 Thread Simon Horman
socat /var/run/haproxy.stat stdio > schema.txt $ echo "show info json" | socat /var/run/haproxy.stat stdio > instance.txt python ./jschema.py $ echo "show stats json" | socat /var/run/haproxy.stat stdio > instance.txt python ./jschema.py Signed-off-by: Simon Horman --

Re: [PATCH/RFC 2/2] MEDIUM: stats: Add show json schema

2016-11-29 Thread Simon Horman
tes more often than > 2^64), it requires 23 years of traffic at 100 Gbps to have that high a > byte count instead of 46 years, so we have some margin. I agree this could be a sticky point. I believe the limits are left up to the implementation. But I'll do a bit of research and see if I can fin

Re: [PATCH/RFC 0/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2016-11-29 Thread Simon Horman
On Tue, Nov 29, 2016 at 08:01:53AM +0100, Willy Tarreau wrote: > Hi Simon, > > On Mon, Nov 28, 2016 at 04:18:52PM +0100, Simon Horman wrote: > > Hi, > > > > this short series is an RFC implementation of adding JSON format > > output to show (info|stat). It

[PATCH/RFC 1/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2016-11-28 Thread Simon Horman
outines to only insert a "," between elements when needed. I would value any feedback on how this might be done better. Signed-off-by: Simon Horman --- For the simple configuration below a comparison of the size of info and stats output is as follows: $ show info =>

[PATCH/RFC 2/2] MEDIUM: stats: Add show json schema

2016-11-28 Thread Simon Horman
/tmp/haproxy.stat stdio > schema.txt $ echo "show info json" | socat /tmp/haproxy.stat stdio > instance.txt python ./jschema.py $ echo "show stats json" | socat /tmp/haproxy.stat stdio > instance.txt python ./jschema.py Signed-off-by: Simon Horman --- In this case

[PATCH/RFC 0/2] MEDIUM: stats: Add JSON output option to show (info|stat)

2016-11-28 Thread Simon Horman
first patch * Possible automatic generation of (part) of schema in 2nd patch * Improved documentation Some discussion of the size of JSON output is included as an appendix to the changelog of the first patch. Simon Horman (2): MEDIUM: stats: Add JSON output option to show (info|stat) MEDIUM

[PATCH] MINOR: stats: correct documentation of process ID for typed output

2016-11-21 Thread Simon Horman
The process ID appears at the end of the first column rather than the line. --- doc/management.txt | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/management.txt b/doc/management.txt index 751621c0392b..f42c0712012e 100644 --- a/doc/management.txt +++ b/doc/man

Re: Getting JSON encoded data from the stats socket.

2016-11-14 Thread Simon Horman
On Mon, Nov 14, 2016 at 08:50:54AM -0500, hapr...@stormcloud9.net wrote: > Might help to see an example of what the results look like when using > this schema, however I do have one comment below. Yes, agreed. I plan to work on making that so. > On 2016/11/14 03:09, Simon Horman wrot

Re: Getting JSON encoded data from the stats socket.

2016-11-14 Thread Simon Horman
Hi Willy, On Mon, Nov 14, 2016 at 03:10:18PM +0100, Willy Tarreau wrote: > On Mon, Nov 14, 2016 at 11:34:18AM +0100, Simon Horman wrote: > > > Sometimes a description like above appears in your example, is it just > > > for a few fields or do you intend to describe all

Re: Getting JSON encoded data from the stats socket.

2016-11-14 Thread Simon Horman
Hi Willy, On Mon, Nov 14, 2016 at 11:11:12AM +0100, Willy Tarreau wrote: > Hi Simon, > > On Mon, Nov 14, 2016 at 09:09:21AM +0100, Simon Horman wrote: > > I took a first pass at defining a schema. > > > > * The schema follows what is described on json-schema.org (or a

Re: Getting JSON encoded data from the stats socket.

2016-11-14 Thread Simon Horman
Hi Willy, Hi All, On Thu, Nov 10, 2016 at 04:52:56PM +0100, Willy Tarreau wrote: > Hi Simon! > > On Thu, Nov 10, 2016 at 04:27:15PM +0100, Simon Horman wrote: > > My preference is to take things calmly as TBH I am only just getting > > started on this and I think the schem

Re: Getting JSON encoded data from the stats socket.

2016-11-10 Thread Simon Horman
On Thu, Nov 10, 2016 at 04:12:31PM +0100, Willy Tarreau wrote: > Hi Malcolm, > > On Thu, Nov 10, 2016 at 12:53:13PM +, Malcolm Turnbull wrote: > > Georg, > > > > That's a timely reminder thanks: > > I just had another chat with Simon Horman who has kin

Re: external-check stdout ends up in load-balanced traffic, destroying tcp sessions

2016-06-07 Thread Simon Horman
On Tue, Jun 07, 2016 at 08:18:21PM +0200, Willy Tarreau wrote: > On Tue, Jun 07, 2016 at 12:01:31PM +0200, Benoit Garnier wrote: > > You can always open /dev/null before chrooting and dup() it into FD 0 and 1 > > after chroot() has been called. > > I'd be more tempted to simply close those FDs af

Re: external-check stdout ends up in load-balanced traffic, destroying tcp sessions

2016-06-06 Thread Simon Horman
Hi Cyril, Hi Lukas, On Mon, Jun 06, 2016 at 08:21:46PM +0200, Cyril Bonté wrote: > Hi Lukas, > > I add Malcolm and Simon to the thread. > > Le 06/06/2016 à 08:36, Lukas Erlacher a écrit : > >Additional info: The output only ends up in the *first* client connection. > > > >Talking about this with

Re: [PATCH 1/4] mailer: increase default timeout to 10 seconds this allows the TCP connection to retry connecting when a packet is lost on the network

2016-02-16 Thread Simon Horman
Hi Pieter, Hi Willy, On Tue, Feb 16, 2016 at 10:11:34PM +0100, P.Baauw wrote: > Hi Willy, Simon, > > Op 16-2-2016 om 21:56 schreef Willy Tarreau: > >Simon, > > > >are you OK with this series from Pieter ? Yes, they look good to me. Thanks Pieter for the fixes/enh

Re: [PATCH] MEDIUM: mailer: try sending a mail up to 3 times

2015-11-20 Thread Simon Horman
On Fri, Nov 20, 2015 at 11:58:19PM +0100, PiBa-NL wrote: > Hi Willy, > > Op 16-11-2015 om 19:57 schreef Willy Tarreau: > >I agree with you since we don't know the timeout value nor what it applies > >to (connection or anything). Thus I think that we should first find and > >change that value, and

Re: [PATCH] MEDIUM: mailer: try sending a mail up to 3 times

2015-11-09 Thread Simon Horman
> > Hoping it might get merged to improve mailer reliability. So no > > 'server down' email gets lost.. > > Thanks everyone for your time :) . > > Looks good to me. Just waiting for Simon's approval. I would slightly prefer if there was a more substantial comment in process_email_alert() noting that retry occurs 3 times. But regardless: Acked-by: Simon Horman

Re: [PATCH v2 0/3] MEDIUM: Change verbosity of email alerts

2015-04-29 Thread Simon Horman
On Thu, Apr 30, 2015 at 07:31:28AM +0200, Willy Tarreau wrote: > Hi Simon, > > On Thu, Apr 30, 2015 at 01:10:32PM +0900, Simon Horman wrote: > > Hi, > > > > the aim of this series is to make the send more email alerts when > > they are likely to be useful an

[PATCH v2 1/3] MEDIUM: Lower priority of email alerts for log-health-checks messages

2015-04-29 Thread Simon Horman
state changes "log-health-checks" needs to be set and "email-alert level" needs to be 'info' or lower. "email-alert mailers" and "email-alert to" settings are also required in order for any email alerts to be sent. A follow-up patch will document

[PATCH v2 3/3] MEDIUM: Document when email-alerts are sent

2015-04-29 Thread Simon Horman
Document the influence of email-alert level and other configuration parameters on when email-alerts are sent. Signed-off-by: Simon Horman --- doc/configuration.txt | 9 + 1 file changed, 9 insertions(+) diff --git a/doc/configuration.txt b/doc/configuration.txt index f72339a04588

[PATCH v2 2/3] MEDIUM: Send email alerts when servers are marked as UP or enter the drain state

2015-04-29 Thread Simon Horman
lert level should be set to 'notice', 'info' or 'debug'. e.g: email-alert level notice "email-alert mailers" and "email-alert to" settings are also required in order for any email alerts to be sent. A follow-up patch will document the above. Signed-of

[PATCH v2 0/3] MEDIUM: Change verbosity of email alerts

2015-04-29 Thread Simon Horman
sending them * Added documentation patch Simon Horman (3): MEDIUM: Lower priority of email alerts for log-health-checks messages MEDIUM: Send email alerts when servers are marked as UP or enter the drain state MEDIUM: Document when email-alerts are sent doc/configuration.txt | 9

Re: [PATCH 1/2] MEDIUM: Do not send email alerts corresponding to log-health-checks messages

2015-04-29 Thread Simon Horman
On Tue, Apr 28, 2015 at 09:24:42AM +0200, Willy Tarreau wrote: > On Tue, Apr 28, 2015 at 02:25:02PM +0900, Simon Horman wrote: > > On Tue, Apr 28, 2015 at 06:43:38AM +0200, Willy Tarreau wrote: > > > Hi Simon, > > > > > > On Tue, Apr 28, 2015 at 10:58:56AM +09

Re: [PATCH 1/2] MEDIUM: Do not send email alerts corresponding to log-health-checks messages

2015-04-27 Thread Simon Horman
On Tue, Apr 28, 2015 at 06:43:38AM +0200, Willy Tarreau wrote: > Hi Simon, > > On Tue, Apr 28, 2015 at 10:58:56AM +0900, Simon Horman wrote: > > This seems only to lead to excessive verbosity which seems > > much more appropriate for logs than email. > > >

[PATCH 0/2] MEDIUM: Change verbosity of email alerts

2015-04-27 Thread Simon Horman
Hi, the aim of this series is to make the send more email alerts when they are likely to be useful and less when they are likely to be unwanted. Simon Horman (2): MEDIUM: Do not send email alerts corresponding to log-health-checks messages MEDIUM: Send email alerts when servers are

[PATCH 2/2] MEDIUM: Send email alerts when servers are marked as UP or enter the drain state

2015-04-27 Thread Simon Horman
lert level should be set to 'notice', 'info' or 'debug'. e.g: email-alert level notice "email-alert mailers" and "email-alert to" settings are also required in order for any email alerts to be sent. Signed-off-by: Simon Horman --- src/server.c | 2 ++

[PATCH 1/2] MEDIUM: Do not send email alerts corresponding to log-health-checks messages

2015-04-27 Thread Simon Horman
This seems only to lead to excessive verbosity which seems much more appropriate for logs than email. Signed-off-by: Simon Horman --- src/checks.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/checks.c b/src/checks.c index 3702d9a4b0fe..efcaff20219b 100644 --- a/src/checks.c +++ b/src

Re: [PATCH v2 0/4] MEDIUM: Enhancements to reporting of drain in stats

2015-04-23 Thread Simon Horman
On Thu, Apr 23, 2015 at 10:01:19AM +0200, Willy Tarreau wrote: > Hi Simon, > > On Thu, Apr 23, 2015 at 02:51:25PM +0900, Simon Horman wrote: > (...) > > This series attempts to address that problem by first disentangling the > > state and colour of servers in the first tw

[PATCH v2 3/4] MEDIUM: Only report drain state in stats if server has SRV_ADMF_DRAIN set

2015-04-22 Thread Simon Horman
=*. This patch makes stats reporting consistent in this regard. This patch does not alter the behaviour that if a server's weight is zero then its stats row is blue when accessed via HTML. This remains the case regardless of if the state is UP or DRAIN. Signed-off-by: Simon Horman --- v2 * Rew

[PATCH v2 2/4] MEDIUM: Separate server state and colour in stats

2015-04-22 Thread Simon Horman
distinguish between DRAIN states and DRAINING colours. Signed-off-by: Simon Horman --- v2 * First post --- src/dumpstats.c | 134 +++- 1 file changed, 83 insertions(+), 51 deletions(-) diff --git a/src/dumpstats.c b/src/dumpstats.c index 402fb0ae98ad

[PATCH v2 1/4] MEDIUM: Add enum srv_stats_state

2015-04-22 Thread Simon Horman
not make any functional changes. Signed-off-by: Simon Horman --- v2 * First post --- src/dumpstats.c | 104 +++- 1 file changed, 57 insertions(+), 47 deletions(-) diff --git a/src/dumpstats.c b/src/dumpstats.c index d82ce8538841..402fb0ae98ad

[PATCH v2 0/4] MEDIUM: Enhancements to reporting of drain in stats

2015-04-22 Thread Simon Horman
changes to reporting of the drain state, as described above. Patches have been lightly tested. Simon Horman (4): MEDIUM: Add enum srv_stats_state MEDIUM: Separate server state and colour in stats MEDIUM: Only report drain state in stats if server has SRV_ADMF_DRAIN set MEDIUM: Differentiate bet

[PATCH v2 4/4] MEDIUM: Differentiate between DRAIN and DRAIN (agent)

2015-04-22 Thread Simon Horman
Differentiate between DRAIN and DRAIN (agent) when reporting stats. This is consistent with the distinction made between DOWN and DOWN (agent). Signed-off-by: Simon Horman --- v2 * Reworked to use SRV_STATS_STATE_* --- src/dumpstats.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion

[PATCH 2/2] MEDIUM: Differentiate between DRAIN and DRAIN (agent)

2015-04-08 Thread Simon Horman
Differentiate between DRAIN and DRAIN (agent) when reporting stats. This is consistent with the distinction made between DOWN and DOWN (agent). Signed-off-by: Simon Horman --- src/dumpstats.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src

[PATCH 1/2] MEDIUM: Only report drain state in stats if server has SRV_ADMF_DRAIN set

2015-04-08 Thread Simon Horman
=*. This patch makes stats reporting consistent in this regard. Signed-off-by: Simon Horman --- src/dumpstats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dumpstats.c b/src/dumpstats.c index d82ce8538841..9f5a4349d231 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c

[PATCH 0/2] Minor enhancements to drain state

2015-04-08 Thread Simon Horman
=DRAIN,weight=* when reporting stats. 2. Differentiate between DRAIN and DRAIN (agent) The motivation here is to make DRAIN consistent with DOWN. Patches have been lightly tested. Simon Horman (2): MEDIUM: Only report drain state in stats if server has SRV_ADMF_DRAIN set MEDIUM

Re: [PATCH] BUG/MEDIUM: Do not consider an agent check as failed on L7 error

2015-02-25 Thread Simon Horman
On Thu, Feb 26, 2015 at 07:09:25AM +0100, Willy Tarreau wrote: > Hi Simon, > > On Thu, Feb 26, 2015 at 11:26:17AM +0900, Simon Horman wrote: > > As failure to connect to the agent check is not sufficient to mark it as > > failed it stands to reason that an L7 e

[PATCH] BUG/MEDIUM: Do not consider an agent check as failed on L7 error

2015-02-25 Thread Simon Horman
agent check occurs regardless of the success of any primary health checks. This behaviour is not correct as a failed agent check should never cause a server to be marked as down or by extension continue to be marked as down. Signed-off-by: Simon Horman --- I believe that an easy way to reproduce

[PATCH 0/2] Allow suppression of email alerts by log level

2015-02-05 Thread Simon Horman
configuration option to set the maximum level to notice or greater. email-alert level notice The first patch in the series provides a contextual dependency of the second patch. Simon Horman (2): LOW: Remove trailing '.' from email alert messages MEDIUM: Allow suppressio

[PATCH 1/2] LOW: Remove trailing '.' from email alert messages

2015-02-05 Thread Simon Horman
This removes the trailing '.' from both the header and the body of email alerts. The main motivation for this change is to make the format of email alerts generated from srv_set_stopped() consistent with those generated from set_server_check_status(). Signed-off-by: Simon Horman

[PATCH 2/2] MEDIUM: Allow suppression of email alerts by log level

2015-02-05 Thread Simon Horman
configuration option to set the maximum level to notice or greater. email-alert level notice Signed-off-by: Simon Horman --- doc/configuration.txt | 36 ++-- include/proto/checks.h | 4 ++-- include/types/proxy.h | 3 +++ src/cfgparse.c | 20

Re: [PATCH/RFC 0/8] Email Alerts

2015-02-03 Thread Simon Horman
On Tue, Feb 03, 2015 at 05:13:02PM +0100, Baptiste wrote: > On Tue, Feb 3, 2015 at 4:59 PM, Pavlos Parissis > wrote: > > On 01/02/2015 03:15 μμ, Willy Tarreau wrote: > >> Hi Simon, > >> > >> On Fri, Jan 30, 2015 at 11:22:52AM +0900, Simon Horman wrote:

[PATCH] MEDIUM: Document email alerts

2015-02-02 Thread Simon Horman
Signed-off-by: Simon Horman --- doc/configuration.txt | 104 ++ 1 file changed, 104 insertions(+) diff --git a/doc/configuration.txt b/doc/configuration.txt index c829590..aa3f30f 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt

Re: [PATCH/RFC 0/8] Email Alerts

2015-02-01 Thread Simon Horman
Hi Willy, On Sun, Feb 01, 2015 at 03:15:27PM +0100, Willy Tarreau wrote: > Hi Simon, > > On Fri, Jan 30, 2015 at 11:22:52AM +0900, Simon Horman wrote: > > Hi Willy, Hi All, > > > > the purpose of this email is to solicit feedback on an implementation > > of em

[PATCH/RFC 8/8] MEDIUM: Support sending email alerts

2015-01-31 Thread Simon Horman
Signed-off-by: Simon Horman --- include/proto/checks.h | 2 + include/types/checks.h | 2 +- include/types/proxy.h | 18 ++- src/cfgparse.c | 26 ++-- src/checks.c | 321 + src/server.c | 1 + 6 files changed

[PATCH/RFC 0/8] Email Alerts

2015-01-31 Thread Simon Horman
For reference this patchset is available in git https://github.com/horms/haproxy devel/email-alert This patchset is based on the current mainline master branch: the 1.6 development branch. The current head commit there is 32602d2 ("BUG/MINOR: checks: prevent http keep-alive with http-check expect&

[PATCH/RFC 1/8] MEDIUM: Remove connect_chk

2015-01-31 Thread Simon Horman
Remove connect_chk and instead call connect_proc_chk() and connect_conn_chk(). There no longer seems to be any value in having a wrapper function here. Signed-off-by: Simon Horman --- src/checks.c | 25 ++--- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/src

[PATCH/RFC 3/8] MEDIUM: Add free_check() helper

2015-01-31 Thread Simon Horman
Add free_check() helper to free the memory allocated by init_check(). Signed-off-by: Simon Horman --- include/proto/checks.h | 1 + src/checks.c | 7 +++ 2 files changed, 8 insertions(+) diff --git a/include/proto/checks.h b/include/proto/checks.h index 1e65652..24dec79 100644

[PATCH/RFC 4/8] MEDIUM: Move proto and addr fields struct check

2015-01-31 Thread Simon Horman
off-by: Simon Horman --- include/types/checks.h | 2 ++ include/types/server.h | 5 - src/checks.c | 14 +++--- src/server.c | 14 +++--- 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/include/types/checks.h b/include/types/checks.h

[PATCH/RFC 6/8] MEDIUM: Add parsing of mailers section

2015-01-31 Thread Simon Horman
As mailer and mailers structures and allow parsing of a mailers section into those structures. These structures will subsequently be freed as it is not yet possible to use reference them in the configuration. Signed-off-by: Simon Horman --- Makefile| 2 +- include/types

[PATCH/RFC 5/8] MEDIUM: Attach tcpcheck_rules to check

2015-01-31 Thread Simon Horman
This is to allow checks to be established whose tcpcheck_rules are not those of its proxy. Signed-off-by: Simon Horman --- include/types/checks.h | 1 + src/checks.c | 34 +- src/server.c | 1 + 3 files changed, 19 insertions(+), 17

[PATCH/RFC 2/8] MEDIUM: Refactor init_check and move to checks.c

2015-01-31 Thread Simon Horman
Refactor init_check so that an error string is returned rather than alerts being printed by it. Also init_check to checks.c and provide a prototype to allow it to be used from multiple C files. Signed-off-by: Simon Horman --- include/proto/checks.h | 2 ++ src/checks.c | 26

[PATCH/RFC 7/8] MEDIUM: Allow configuration of email alerts

2015-01-31 Thread Simon Horman
This currently does nothing beyond parsing the configuration and storing in the proxy as there is no implementation of email alerts. Signed-off-by: Simon Horman --- include/types/mailers.h | 6 +-- include/types/proxy.h | 10 + src/cfgparse.c | 109

Re: [PATCH 1/2] BUG/MEDIUM: Do not set agent health to zero if server is disabled in config

2015-01-22 Thread Simon Horman
On Thu, Jan 22, 2015 at 08:24:57PM +0100, Willy Tarreau wrote: > Hi Simon, > > On Tue, Jan 20, 2015 at 01:22:38PM +0900, Simon Horman wrote: > (...) > > This seems to have slipped through the cracks. > > I'm wondering if we could revisit it and the other patch in thi

Re: [PATCH 1/2] BUG/MEDIUM: Do not set agent health to zero if server is disabled in config

2015-01-19 Thread Simon Horman
Hi Willy, On Mon, Dec 01, 2014 at 09:18:05AM +0900, Simon Horman wrote: > On Wed, Nov 12, 2014 at 05:11:27PM +0900, Simon Horman wrote: > > On Wed, Nov 12, 2014 at 08:22:05AM +0100, Willy Tarreau wrote: > > > Hi Simon, > > > > > > On Wed, Nov 12, 2014 at

Re: [PATCH 1/2] BUG/MEDIUM: Do not set agent health to zero if server is disabled in config

2014-11-30 Thread Simon Horman
On Wed, Nov 12, 2014 at 05:11:27PM +0900, Simon Horman wrote: > On Wed, Nov 12, 2014 at 08:22:05AM +0100, Willy Tarreau wrote: > > Hi Simon, > > > > On Wed, Nov 12, 2014 at 03:55:53PM +0900, Simon Horman wrote: > > > disable starts a server in the disabled sta

Re: [PATCH 1/2] BUG/MEDIUM: Do not set agent health to zero if server is disabled in config

2014-11-12 Thread Simon Horman
On Wed, Nov 12, 2014 at 08:22:05AM +0100, Willy Tarreau wrote: > Hi Simon, > > On Wed, Nov 12, 2014 at 03:55:53PM +0900, Simon Horman wrote: > > disable starts a server in the disabled state, however setting the health > > of an agent implies that the agent is disabled

Re: Testing with servers disabled in config and feedback agent check enabled 1.6dev0

2014-11-11 Thread Simon Horman
Hi Mark, Hi All, On Tue, Sep 02, 2014 at 02:59:32PM +0100, Mark Brooks wrote: > Hello All, > > Im testing starting the backend servers as disabled in the config > according to the manual - > "disabled > The "disabled" keyword starts the server in the "disabled" state. That means > that it is

[PATCH 1/2] BUG/MEDIUM: Do not set agent health to zero if server is disabled in config

2014-11-11 Thread Simon Horman
example, if a server is started disabled and then the server state is set to ready then without this change show stat indicates that the server is "DOWN (agent)" when it is expected that the server would be UP if its (non-agent) health check passes. Reported-by: Mark Brooks Signed-off

[PATCH 2/2] MEDIUM/BUG: Only explicitly report "DOWN (agent)" if the agent health is zero

2014-11-11 Thread Simon Horman
EDIUM: stats: report down caused by agent prior to reporting up"). Note that "DOWN (agent)" may also be reported by a more generic conditional which immediately follows the code changed by this patch. Reported-by: Mark Brooks Signed-off-by: Simon Horman --- src/dumpstats.c |

[PATCH 0/2] Do not incorrectly report status as "DOWN (agent)"

2014-11-11 Thread Simon Horman
Hi, this short series is intended to address to cases where the status of a backend is incorrectly reported as "DOWN (agent)". Simon Horman (2): BUG/MEDIUM: Do not set agent health to zero if server is disabled in config MEDIUM/BUG: Only explicitly report "DOWN (agent

Re: Problems with agent check

2014-11-11 Thread Simon Horman
On Mon, Nov 10, 2014 at 01:45:45PM +0100, Cyril Bonté wrote: > Hi, > > Le 10/11/2014 12:54, Lasse Birnbaum Jensen a écrit : > >Hi all > > > >I have a problem with agent checks on a ssl backend (i cannot change the > >backend to http). This configuration forces the agent-check port expect ssl, >

Re: Problem with external healthchecks and haproxy-ss-20140720

2014-08-15 Thread Simon Horman
On Fri, Aug 15, 2014 at 09:12:56AM +0100, Malcolm Turnbull wrote: > I agree as well.. :-). > > Our original specification was to match the way that ldirectord does its > external health checks (so that the customer scripts are compatible). > We could just change ldirectord to be compatible with th

Re: Problem with external healthchecks and haproxy-ss-20140720

2014-08-15 Thread Simon Horman
[Cc Malcolm Turnbull] On Fri, Aug 15, 2014 at 12:29:36AM +0200, Willy Tarreau wrote: > Hi Cyril! > > On Thu, Aug 14, 2014 at 10:30:52PM +0200, Cyril Bonté wrote: > > Hi all, > > > > Le 07/08/2014 01:16, Cyril Bonté a écrit : > > >Hi Bjoern, > > > > > >Le 06/08/2014 22:16, bjun...@gmail.com a écr

Re: Email Alert Proposal

2014-06-24 Thread Simon Horman
On Tue, Jun 24, 2014 at 07:29:15AM +0200, Willy Tarreau wrote: > Hi Simon, > > On Tue, Jun 24, 2014 at 09:15:13AM +0900, Simon Horman wrote: > > Hi Willy, > > > > Malcolm has asked me to open a discussion with you regarding adding > > email alerts to haproxy and

Email Alert Proposal

2014-06-23 Thread Simon Horman
Hi Willy, Malcolm has asked me to open a discussion with you regarding adding email alerts to haproxy and that is the purpose of this email. In essence the motivation is to provide a lightweight email alert feature that may be used in situations where a full-blown monitoring system is not in use.

Re: [PATCH] MEDIUM: Add external check

2014-06-19 Thread Simon Horman
On Fri, Jun 20, 2014 at 07:10:55AM +0200, Willy Tarreau wrote: > On Fri, Jun 20, 2014 at 12:30:16PM +0900, Simon Horman wrote: > > Add an external check which makes use of an external process to > > check the status of a server. > > > > --- > > > > v8 >

Re: [PATCH] BUG/MEDIUM: Consistently use 'check' in process_chk

2014-06-19 Thread Simon Horman
On Fri, Jun 20, 2014 at 07:07:56AM +0200, Willy Tarreau wrote: > On Fri, Jun 20, 2014 at 12:29:47PM +0900, Simon Horman wrote: > > I am not entirely sure that this is a bug, but it seems > > to me that it may cause a problem if there agent-check is > > configured and there

[PATCH] MEDIUM: Add external check

2014-06-19 Thread Simon Horman
Add an external check which makes use of an external process to check the status of a server. --- v8 * Rebase onto v1.6-dev0 v7 * Manual Rebase * Make "option external-check" configuration parameter boolean * Add "external-check command" configuration parameter * Add "external-check path" confi

[PATCH] BUG/MEDIUM: Consistently use 'check' in process_chk

2014-06-19 Thread Simon Horman
I am not entirely sure that this is a bug, but it seems to me that it may cause a problem if there agent-check is configured and there is some kind of error making a connection for it. Signed-off-by: Simon Horman --- src/checks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v8] MEDIUM: Add port_to_str helper

2014-06-16 Thread Simon Horman
On Mon, Jun 16, 2014 at 10:11:10AM +0200, Willy Tarreau wrote: > On Mon, Jun 16, 2014 at 09:39:41AM +0900, Simon Horman wrote: > > This helper is similar to addr_to_str but > > tries to convert the port rather than the address > > of a struct sockaddr_storage. > > >

[PATCH v8] MEDIUM: Add port_to_str helper

2014-06-15 Thread Simon Horman
This helper is similar to addr_to_str but tries to convert the port rather than the address of a struct sockaddr_storage. This is in preparation for supporting an external agent check. Signed-off-by: Simon Horman -- v8 * Correct endian problem by calling ntohs(port) v7 * First post

Re: [PATCH v7 1/3] MEDIUM: Add port_to_str helper

2014-06-15 Thread Simon Horman
On Mon, Jun 16, 2014 at 08:55:52AM +0900, Simon Horman wrote: > On Fri, Jun 13, 2014 at 06:39:18PM +0200, Willy Tarreau wrote: > > On Fri, Jun 13, 2014 at 04:18:15PM +0900, Simon Horman wrote: > > > This helper is similar to addr_to_str but > > > tries to convert the p

Re: [PATCH v7 1/3] MEDIUM: Add port_to_str helper

2014-06-15 Thread Simon Horman
On Fri, Jun 13, 2014 at 06:39:18PM +0200, Willy Tarreau wrote: > On Fri, Jun 13, 2014 at 04:18:15PM +0900, Simon Horman wrote: > > This helper is similar to addr_to_str but > > tries to convert the port rather than the address > > of a struct sockaddr_storage. > > >

Re: [PATCH v7 0/3] MEDIUM: Add external check

2014-06-13 Thread Simon Horman
On Fri, Jun 13, 2014 at 10:41:54AM +0200, Willy Tarreau wrote: > Hi Simon! > > On Fri, Jun 13, 2014 at 04:18:14PM +0900, Simon Horman wrote: > > Add an external check which makes use of an external process to > > check the status of a server. > > > > v7 updates

[PATCH v7 3/3] MEDIUM: Add external check

2014-06-13 Thread Simon Horman
Add an external check which makes use of an external process to check the status of a server. --- Status: pending v7 * Manual Rebase * Make "option external-check" configuration parameter boolean * Add "external-check command" configuration parameter * Add "external-check path" configuration pa

[PATCH v7 2/3] MEDIUM: Break out check establishment into connect_chk()

2014-06-13 Thread Simon Horman
This is in preparation for adding a new type of check that uses a process rather than a socket. Signed-off-by: Simon Horman --- v7 * Use connect_chk() as the name of the new function * Manual rebase - Add SN_ERR_UP return value to connect_chk() to handle the case where the task should be

[PATCH v7 0/3] MEDIUM: Add external check

2014-06-13 Thread Simon Horman
Add an external check which makes use of an external process to check the status of a server. v7 updates this patchset as per the feedback received for v6 (a very long time ago). Simon Horman (3): MEDIUM: Add port_to_str helper MEDIUM: Break out check establishment into connect_chk

[PATCH v7 1/3] MEDIUM: Add port_to_str helper

2014-06-13 Thread Simon Horman
This helper is similar to addr_to_str but tries to convert the port rather than the address of a struct sockaddr_storage. This is in preparation for supporting an external agent check. Signed-off-by: Simon Horman -- v7 * First post --- include/common/standard.h | 8 src/standard.c

Re: Health check hell

2013-12-02 Thread Simon Horman
On Thu, Nov 28, 2013 at 03:41:15PM +0100, Willy Tarreau wrote: > Hi guys, > > I'm CCing the persons who've been most involved in the evolutions of the > health check system and who might have strong opinions about what to take > care of. > > The recent inclusion of the agent-check has unveiled ho

Re: set weight bug?

2013-11-27 Thread Simon Horman
On Wed, Nov 27, 2013 at 05:09:47PM +0100, Willy Tarreau wrote: > On Wed, Nov 27, 2013 at 10:41:12PM +0800, Igor wrote: > > It's almost the same except some servers with weight=0 in conf, script > > to disable/enable servers works fine with haproxy-ss-20131031, but > > with haproxy-ss-20131122 or n

Re: [PATCH v7 0/9] Auxiliary Agent Check

2013-11-26 Thread Simon Horman
On Mon, Nov 25, 2013 at 12:43:59PM +0100, Willy Tarreau wrote: > On Mon, Nov 25, 2013 at 10:06:16AM +, Malcolm Turnbull wrote: > > Willy, > > > > Our agent currently replies with: > > > > drain\n > > stop\n > > 50%\n > > etc. > > > > and its not in production yet (looking forward to it being

[PATCH v7 7/9] MEDIUM: Set rise and fall of agent checks to 1

2013-11-24 Thread Simon Horman
f the agent check to be configurable, however this has not been implemented at this stage. Signed-off-by: Simon Horman --- v7 * Manual Rebase * Remove residual instance of 'server->' in comment in struct check hunk Notes by Willy on v6: One remaining "server" below :

[PATCH v7 9/9] MEDIUM: Add DRAIN state and report it on the stats page

2013-11-24 Thread Simon Horman
Add a DRAIN sub-state for a server which will be shown on the stats page instead of UP if its effective weight is zero. Also, log if a server enters or leaves the DRAIN state as the result of an agent check. Signed-off-by: Simon Horman --- Status: pending v7 * Update comment above

[PATCH v7 5/9] MEDIUM: checks: Add supplementary agent checks

2013-11-24 Thread Simon Horman
a description string. This currently has the same behaviour as "down". Signed-off-by: Simon Horman --- v7 * Manual Rebase * Add "agent-check" keyword which is used to enable agent checks explicitly. This allows the "agent-port" setting to be used in th

[PATCH v7 8/9] MEDIUM: Add enable and disable agent unix socket commands

2013-11-24 Thread Simon Horman
den by the agent. Signed-off-by: Simon Horman --- v7 * Manual rebase * Use enable|disable agent / instead of set agent / pause|unpause. - This is a reasonably trivial re-write of most of the patch * Rename patch from "MEDIUM: Add set agent pause|unpause unix socket command" to &qu

[PATCH v7 6/9] MEDIUM: Do not mark a server as down if the agent is unavailable

2013-11-24 Thread Simon Horman
In the case where agent-port is used and the agent check is a secondary check to not mark a server as down if the agent becomes unavailable. In this configuration the agent should only cause a server to be marked as down if the agent returns "fail", "stopped" or "dow

[PATCH v7 3/9] MEDIUM: Log agent fail, stopped or down as info

2013-11-24 Thread Simon Horman
-by: Simon Horman --- v7 * Manual Rebase Notes by Willy on v6: OK --- src/checks.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/checks.c b/src/checks.c index 6b7c382..d865c0b 100644 --- a/src/checks.c +++ b/src/checks.c @@ -1010,10 +1010,7 @@ static void

[PATCH v7 4/9] MEDIUM: Remove option lb-agent-chk

2013-11-24 Thread Simon Horman
-used by the planned features that are mentioned above. Signed-off-by: Simon Horman --- v7 * First post --- doc/configuration.txt | 53 ++- src/cfgparse.c| 7 --- 2 files changed, 6 insertions(+), 54 deletions(-) diff --git a/doc/con

[PATCH v7 1/9] MEDIUM: Add helper for task creation for checks

2013-11-24 Thread Simon Horman
This helper is in preparation for adding a second struct check element to struct server. Signed-off-by: Simon Horman --- v7 * Moved cfgparse change to previous patch * Reversed polarity of start_check_task() and updated caller accordingly * Move increment of servpos to outside of if condition

[PATCH v7 0/9] Auxiliary Agent Check

2013-11-24 Thread Simon Horman
d-external-check-v7.snapshot.20141125 Simon Horman (9): MEDIUM: Add helper for task creation for checks MEDIUM: Add helper function for failed checks MEDIUM: Log agent fail, stopped or down as info MEDIUM: Remove option lb-agent-chk MEDIUM: checks: Add supplementary agent checks MEDIUM: D

[PATCH v7 2/9] MEDIUM: Add helper function for failed checks

2013-11-24 Thread Simon Horman
This consolidates some logic in preparation for enhancing it. Signed-off-by: Simon Horman --- Status: pending v7 * First post in this form. Previously part of "MEDIUM: Do not mark a server as down if the agent is unavailable" --- src/checks.c | 37 --

  1   2   3   4   >