haproxy/include/proto
Krzysztof Oledzki 85130941e7 [MEDIUM] stats: report server and backend cumulated downtime
Hello,

This patch implements new statistics for SLA calculation by adding new
field 'Dwntime' with total down time since restart (both HTTP/CSV) and
extending status field (HTTP) or inserting a new one (CSV) with time
showing how long each server/backend is in a current state. Additionaly,
down transations are also calculated and displayed for backends, so it is
possible to know how many times selected backend was down, generating "No
server is available to handle this request." error.

New information are presentetd in two different ways:
   - for HTTP: a "human redable form", one of "100000d 23h", "23h 59m" or
      "59m 59s"
   - for CSV: seconds

I believe that seconds resolution is enough.

As there are more columns in the status page I decided to shrink some
names to make more space:
   - Weight -> Wght
   - Check -> Chk
   - Down -> Dwn

Making described changes I also made some improvements and fixed some
small bugs:
   - don't increment s->health above 's->rise + s->fall - 1'. Previously it
     was incremented an then (re)set to 's->rise + s->fall - 1'.
   - do not set server down if it is down already
   - do not set server up if it is up already
   - fix colspan in multiple places (mostly introduced by my previous patch)
   - add missing "status" header to CSV
   - fix order of retries/redispatches in server (CSV)
   - s/Tthen/Then/
   - s/server/backend/ in DATA_ST_PX_BE (dumpstats.c)

Changes from previous version:
  - deal with negative time intervales
  - don't relay on s->state (SRV_RUNNING)
  - little reworked human_time + compacted format (no spaces). If needed it
    can be used in the future for other purposes by optionally making "cnt"
    as an argument
  - leave set_server_down mostly unchanged
  - only little reworked "process_chk: 9"
  - additional fields in CSV are appended to the rigth
  - fix "SEC" macro
  - named arguments (human_time, be_downtime, srv_downtime)

Hope it is OK. If there are only cosmetic changes needed please fill free
to correct it, however if there are some bigger changes required I would
like to discuss it first or at last to know what exactly was changed
especially since I already put this patch into my production server. :)

Thank you,

Best regards,

 				Krzysztof Oledzki
2007-10-22 21:36:23 +02:00
..
acl.h [MEDIUM] acl: added the TRUE and FALSE ACLs. 2007-06-17 20:40:25 +02:00
backend.h [MEDIUM] stats: report server and backend cumulated downtime 2007-10-22 21:36:23 +02:00
buffers.h [BUG] do not re-arm read timeout after writing data 2007-06-03 16:03:49 +02:00
checks.h [MEDIUM] Spread health checks even more 2007-10-15 09:33:10 +02:00
client.h [MEDIUM] store the original destination address in the session 2007-05-08 23:24:20 +02:00
cttproxy.h [MEDIUM] check for cttproxy support when required 2007-03-24 17:24:39 +01:00
dumpstats.h [MEDIUM] introduce the "stats" keyword in global section 2007-10-18 14:16:11 +02:00
fd.h [MAJOR] auto-registering of pollers at load time 2007-04-16 00:25:25 +02:00
hdr_idx.h [MAJOR] huge rework of the HTTP request FSM 2007-01-21 19:16:41 +01:00
httperr.h [MEDIUM] errorloc now checked first from backend then from frontend 2006-12-24 17:47:20 +01:00
log.h [MAJOR] ported requri to use mempools v2 2007-05-13 21:36:56 +02:00
proto_http.h [MAJOR] replaced all timeouts with struct timeval 2007-05-12 22:35:00 +02:00
proto_uxst.h [MAJOR] implemented client-side support for PF_UNIX sockets 2007-10-18 14:11:15 +02:00
protocols.h [MAJOR] added generic protocol support 2007-10-18 14:11:12 +02:00
proxy.h [MAJOR] replaced all timeouts with struct timeval 2007-05-12 22:35:00 +02:00
queue.h [MAJOR] ported pendconn to mempools v2 2007-05-13 20:19:55 +02:00
senddata.h [MEDIUM] moved stats and buffer generic functions to new files 2007-10-18 14:12:21 +02:00
server.h [MEDIUM] stats: report server and backend cumulated downtime 2007-10-22 21:36:23 +02:00
session.h [MAJOR] migrated task, tree64 and session to pool2 2007-05-13 19:43:47 +02:00
stream_sock.h [MEDIUM] got rid of event_{cli,srv}_write() in favor of stream_sock_write() 2006-07-29 19:01:31 +02:00
task.h [MAJOR] migrated task, tree64 and session to pool2 2007-05-13 19:43:47 +02:00
template.h