]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MEDIUM] Health check reporting code rework + health logging, v3
authorKrzysztof Piotr Oledzki <ole@ans.pl>
Sun, 27 Sep 2009 13:50:02 +0000 (15:50 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 1 Oct 2009 08:17:37 +0000 (10:17 +0200)
commit213014e587d63d868fd54346b1a9bd228cdd24ca
tree613710be5f0f091143e09f7b1dcea117ab91bb4c
parent78abe618a87df1f63f7a6b439c72173f4bee5b85
[MEDIUM] Health check reporting code rework + health logging, v3

This patch adds health logging so it possible to check what
was happening before a crash. Failed healt checks are logged if
server is UP and succeeded healt checks if server is DOWN,
so the amount of additional information is limited.

I also reworked the code a little:

 - check_status_description[] and check_status_info[] is now
   joined into check_statuses[]

 - set_server_check_status updates not only s->check_status and
   s->check_duration but also s->result making the code simpler

Changes in v3:
 - for now calculate and use local versions of health/rise/fall/state,
   it is a slow path, no harm should be done. One day we may centralize
   processing of the checks and remove the duplicated code.
 - also log checks that are restoring current state
 - use "conditionally succeeded" for 404 with disable-on-404
doc/configuration.txt
include/types/checks.h
include/types/proxy.h
src/cfgparse.c
src/checks.c