mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-18 13:56:52 +02:00
MINOR: stats: define the concept of domain for statistics
The domain option will be used to have statistics attached to other objects than proxies/listeners/servers. At the moment, only the PROXY domain is available. Add an argument 'domain' on the 'show stats' cli command to specify the domain. Only 'domain proxy' is available now. If not specified, proxy will be considered the default domain. For HTML output, only proxy statistics will be displayed.
This commit is contained in:
committed by
Christopher Faulet
parent
f98d821b94
commit
072f97eddf
@@ -120,6 +120,7 @@ struct appctx {
|
||||
struct {
|
||||
void *obj1; /* context pointer used in stats dump */
|
||||
void *obj2; /* context pointer used in stats dump */
|
||||
uint32_t domain; /* set the stats to used, for now only proxy stats are supported */
|
||||
int scope_str; /* limit scope to a frontend/backend substring */
|
||||
int scope_len; /* length of the string above in the buffer */
|
||||
int px_st; /* STAT_PX_ST* */
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
#define STATS_TYPE_SV 2
|
||||
#define STATS_TYPE_SO 3
|
||||
|
||||
#define STATS_DOMAIN (0) /* used for bitshifting, type of statistics, for now only proxy is available */
|
||||
|
||||
/* HTTP stats : applet.st0 */
|
||||
enum {
|
||||
STAT_HTTP_INIT = 0, /* Initial state */
|
||||
@@ -450,5 +452,12 @@ struct field {
|
||||
} u;
|
||||
};
|
||||
|
||||
/* stats_domain is used in a flag as a 1 byte field */
|
||||
enum stats_domain {
|
||||
STATS_DOMAIN_PROXY = 0,
|
||||
STATS_DOMAIN_COUNT,
|
||||
|
||||
STATS_DOMAIN_MASK = 0xff
|
||||
};
|
||||
|
||||
#endif /* _HAPROXY_STATS_T_H */
|
||||
|
||||
Reference in New Issue
Block a user