haproxy/include/types
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.h [MEDIUM] acl: support '-i' to ignore case when matching 2007-06-17 08:20:33 +02:00
backend.h [CLEANUP] fwrr: ensure that we never overflow in placements 2007-12-02 11:01:23 +01: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 [CLEANUP] included common/version.h everywhere 2006-06-29 18:54:54 +02:00
fd.h [BUG] fix truncated responses with sepoll 2008-01-18 17:20:13 +01:00
global.h [OPTIM] introduce global parameter "tune.maxaccept" 2008-01-06 11:22:57 +01:00
hdr_idx.h [BUG] files were missing for hdr_idx in previous commit 2006-12-04 02:20:02 +01:00
httperr.h [MAJOR] udpated the stats page to clearly distinguish FEs and BEs 2007-01-01 21:38:07 +01:00
log.h [BUILD] fix build on AIX due to recent log changes 2007-12-05 11:11:55 +01:00
polling.h [MAJOR] introduced speculative I/O with epoll() 2007-04-16 00:53:59 +02:00
proto_http.h [OPTIM] used unsigned ints for HTTP state and message offsets 2008-02-14 23:14:30 +01:00
protocols.h [MEDIUM] support fully transparent proxy on Linux (USE_LINUX_TPROXY) 2008-01-13 14:49:51 +01:00
proxy.h [BUG] timeout.check was not pre-set to eternity 2008-02-15 11:15:34 +01:00
queue.h [MAJOR] ported pendconn to mempools v2 2007-05-13 20:19:55 +02:00
server.h [MEDIUM] Implement "track [<backend>/]<server>" 2008-02-27 10:39:53 +01:00
session.h [MAJOR] proto_uxst rework -> SNMP support 2008-03-04 06:32:16 +01:00
task.h [MAJOR] migrated task, tree64 and session to pool2 2007-05-13 19:43:47 +02:00
template.h [CLEANUP] included common/version.h everywhere 2006-06-29 18:54:54 +02:00