haproxy/src
Krzysztof Piotr Oledzki 2c6962c3c0 [MAJOR] proto_uxst rework -> SNMP support
Currently there is a ~16KB limit for a data size passed via unix socket.
It is caused by a trivial bug ttat is going to fixed soon, however
in most cases there is no need to dump a full stats.

This patch makes possible to select a scope of dumped data by extending
current "show stat" to "show stat [<iid> <type> <sid>]":
 - iid is a proxy id, -1 to dump all proxies
 - type selects type of dumpable objects: 1 for frontend, 2 for backend, 4 for
   server, -1 for all types. Values can be ORed, for example:
     1+2=3   -> frontend+backend.
     1+2+4=7 -> frontend+backend+server.
 - sid is a service id, -1 to dump everything from the selected proxy.

To do this I implemented a new session flag (SN_STAT_BOUND), added three
variables in data_ctx.stats (iid, type, sid), modified dumpstats.c and
completely revorked the process_uxst_stats: now it waits for a "\n"
terminated string, splits args and uses them. BTW: It should be quite easy
to add new commands, for example to enable/disable servers, the only problem
I can see is a not very lucky config name (*stats* socket). :|

During the work I also fixed two bug:
 - s->flags were not initialized for proto_uxst
 - missing comma if throttling not enabled (caused by a stupid change in
     "Implement persistent id for proxies and servers")

Other changes:
 - No more magic type valuse, use STATS_TYPE_FE/STATS_TYPE_BE/STATS_TYPE_SV
 - Don't memset full s->data_ctx (it was clearing s->data_ctx.stats.{iid/type/sid},
    instead initialize stats.sv & stats.sv_st (stats.px and stats.px_st were already
    initialized)

With all that changes it was extremely easy to write a short perl plugin
for a perl-enabled net-snmp (also included in this patch).

29385 is my PEN (Private Enterprise Number) and I'm willing to donate
the SNMPv2-SMI::enterprises.29385.106.* OIDs for HAProxy if there
is nothing assigned already.
2008-03-04 06:32:16 +01:00
..
acl.c [MEDIUM] restrict the set of allowed characters for identifiers 2007-12-02 18:45:09 +01:00
appsession.c
backend.c [MEDIUM]: Prevent redispatcher from selecting the same server, version #3 2008-03-04 06:16:37 +01:00
base64.c
buffers.c
cfgparse.c [MINOR] Implement persistent id for proxies and servers 2008-02-28 17:23:59 +01:00
checks.c [MEDIUM]: Prevent redispatcher from selecting the same server, version #3 2008-03-04 06:16:37 +01:00
client.c [BUG] fix truncated responses with sepoll 2008-01-18 17:20:13 +01:00
cttproxy.c
dumpstats.c [MAJOR] proto_uxst rework -> SNMP support 2008-03-04 06:32:16 +01:00
eb32tree.c [MINOR] merge ebtree version 3.0 2007-11-28 14:20:44 +01:00
eb64tree.c [MINOR] merge ebtree version 3.0 2007-11-28 14:20:44 +01:00
ebpttree.c [MINOR] merge ebtree version 3.0 2007-11-28 14:20:44 +01:00
ebtree.c [MINOR] merge ebtree version 3.0 2007-11-28 14:20:44 +01:00
ev_epoll.c [OPTIM] GCC4's builtin_expect() is suboptimal 2008-02-14 23:14:33 +01:00
ev_kqueue.c
ev_poll.c
ev_select.c
ev_sepoll.c [BUG] fix truncated responses with sepoll 2008-01-18 17:20:13 +01:00
fd.c
haproxy.c [OPTIM] introduce global parameter "tune.maxaccept" 2008-01-06 11:22:57 +01:00
hdr_idx.c
log.c [BUG] log response byte count, not request 2008-01-18 11:16:32 +01:00
memory.c
proto_http.c [MEDIUM]: Prevent redispatcher from selecting the same server, version #3 2008-03-04 06:16:37 +01:00
proto_tcp.c [BUG] fix truncated responses with sepoll 2008-01-18 17:20:13 +01:00
proto_uxst.c [MAJOR] proto_uxst rework -> SNMP support 2008-03-04 06:32:16 +01:00
protocols.c [MINOR] add a generic unbind_all_listeners() primitive 2007-11-04 22:42:49 +01:00
proxy.c [MEDIUM] Implement "track [<backend>/]<server>" 2008-02-27 10:39:53 +01:00
queue.c [MEDIUM] implement the slowstart parameter for servers 2007-11-30 17:42:05 +01:00
rbtree.c
regex.c
senddata.c
server.c [MEDIUM]: rework checks handling 2008-01-22 11:29:06 +01:00
session.c [OPTIM] small optimization on session_process_counters() 2007-11-26 20:22:47 +01:00
sessionhash.c
standard.c [BUILD] fix build on Solaris due to recent log changes 2007-12-06 00:53:51 +01:00
stream_sock.c [BUG] fix truncated responses with sepoll 2008-01-18 17:20:13 +01:00
task.c [OPTIM] GCC4's builtin_expect() is suboptimal 2008-02-14 23:14:33 +01:00
time.c [BUILD] fix 2 minor issues on AIX 2007-11-30 18:38:35 +01:00
uri_auth.c