haproxy/include/types
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: support '-i' to ignore case when matching 2007-06-17 08:20:33 +02:00
backend.h [MINOR] add the "nolinger" option to disable data lingering 2007-10-15 09:33:06 +02:00
buffers.h [BUG] do not re-arm read timeout after writing data 2007-06-03 16:03:49 +02:00
capture.h [MAJOR] last bunch of capture changes for mempool v2 2007-05-13 22:46:04 +02:00
client.h
fd.h [MAJOR] added generic protocol support 2007-10-18 14:11:12 +02:00
global.h [MEDIUM] introduce the "stats" keyword in global section 2007-10-18 14:16:11 +02:00
hdr_idx.h
httperr.h [MAJOR] udpated the stats page to clearly distinguish FEs and BEs 2007-01-01 21:38:07 +01:00
log.h [MAJOR] ported requri to use mempools v2 2007-05-13 21:36:56 +02:00
polling.h [MAJOR] introduced speculative I/O with epoll() 2007-04-16 00:53:59 +02:00
proto_http.h [MEDIUM] acl: implement matching on header values 2007-06-10 19:45:56 +02:00
protocols.h [MINOR] make it possible to set unix socket permissions 2007-10-18 14:11:55 +02:00
proxy.h [MEDIUM] stats: report server and backend cumulated downtime 2007-10-22 21:36:23 +02:00
queue.h [MAJOR] ported pendconn to mempools v2 2007-05-13 20:19:55 +02:00
server.h [MEDIUM] stats: report server and backend cumulated downtime 2007-10-22 21:36:23 +02:00
session.h [MEDIUM] implement the CSV output for the statistics 2007-10-18 14:12:28 +02:00
task.h [MAJOR] migrated task, tree64 and session to pool2 2007-05-13 19:43:47 +02:00
template.h