#include <haproxy/sample.h>
#include <proto/server.h>
#include <proto/ssl_sock.h>
-#include <proto/stats.h>
+#include <haproxy/stats.h>
#include <proto/stream.h>
#include <proto/stream_interface.h>
#include <haproxy/task.h>
/*
- * include/types/stats.h
+ * include/haproxy/stats-t.h
* This file provides structures and types for stats.
*
+ * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, version 2.1
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _TYPES_STATS_H
-#define _TYPES_STATS_H
+#ifndef _HAPROXY_STATS_T_H
+#define _HAPROXY_STATS_T_H
+
+#include <haproxy/api-t.h>
/* Flags for applet.ctx.stats.flags */
#define STAT_FMT_HTML 0x00000001 /* dump the stats in HTML format */
FS_MASK = 0xFF000000,
};
-/* Please consider updating stats_dump_fields_*(),
- * stats_dump_.*_info_fields() and stats_*_schema()
- * when modifying struct field or related enums.
- */
-struct field {
- uint32_t type;
- union {
- int32_t s32; /* FF_S32 */
- uint32_t u32; /* FF_U32 */
- int64_t s64; /* FF_S64 */
- uint64_t u64; /* FF_U64 */
- double flt; /* FF_FLT */
- const char *str; /* FF_STR */
- } u;
-};
-
/* Show Info fields for CLI output. For any field added here, please add the text
* representation in the info_field_names array below. Please only append at the end,
* before the INF_TOTAL_FIELDS entry, and never insert anything in the middle
ST_F_TOTAL_FIELDS
};
+/* Please consider updating stats_dump_fields_*(),
+ * stats_dump_.*_info_fields() and stats_*_schema()
+ * when modifying struct field or related enums.
+ */
+struct field {
+ uint32_t type;
+ union {
+ int32_t s32; /* FF_S32 */
+ uint32_t u32; /* FF_U32 */
+ int64_t s64; /* FF_S64 */
+ uint64_t u64; /* FF_U64 */
+ double flt; /* FF_FLT */
+ const char *str; /* FF_STR */
+ } u;
+};
+
-#endif /* _TYPES_STATS_H */
+#endif /* _HAPROXY_STATS_T_H */
/*
- * include/proto/stats.h
+ * include/haproxy/stats.h
* This file contains definitions of some primitives to dedicated to
* statistics output.
*
- * Copyright (C) 2000-2011 Willy Tarreau - w@1wt.eu
+ * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _PROTO_STATS_H
-#define _PROTO_STATS_H
+#ifndef _HAPROXY_STATS_H
+#define _HAPROXY_STATS_H
#include <haproxy/applet-t.h>
-#include <haproxy/tools.h>
#include <haproxy/api.h>
+#include <haproxy/stats-t.h>
+#include <haproxy/tools-t.h>
#include <types/stream_interface.h>
-#include <types/stats.h>
+
+
+/* These two structs contains all field names and descriptions according to
+ * the the number of entries in "enum stat_field" and "enum info_field"
+ */
+extern const struct name_desc stat_fields[];
+extern const struct name_desc info_fields[];
+extern const char *stat_status_codes[];
+extern struct applet http_stats_applet;
+
+
+int stats_fill_info(struct field *info, int len);
+int stats_fill_fe_stats(struct proxy *px, struct field *stats, int len);
+int stats_fill_li_stats(struct proxy *px, struct listener *l, int flags,
+ struct field *stats, int len);
+int stats_fill_sv_stats(struct proxy *px, struct server *sv, int flags,
+ struct field *stats, int len);
+int stats_fill_be_stats(struct proxy *px, int flags, struct field *stats, int len);
+
+void stats_io_handler(struct stream_interface *si);
+int stats_emit_raw_data_field(struct buffer *out, const struct field *f);
+int stats_emit_typed_data_field(struct buffer *out, const struct field *f);
+int stats_emit_field_tags(struct buffer *out, const struct field *f,
+ char delim);
static inline enum field_format field_format(const struct field *f, int e)
return f;
}
-extern const char *stat_status_codes[];
-
-/* These two structs contains all field names and descriptions according to
- * the the number of entries in "enum stat_field" and "enum info_field"
- */
-extern const struct name_desc stat_fields[];
-extern const struct name_desc info_fields[];
-
-int stats_fill_info(struct field *info, int len);
-int stats_fill_fe_stats(struct proxy *px, struct field *stats, int len);
-int stats_fill_li_stats(struct proxy *px, struct listener *l, int flags,
- struct field *stats, int len);
-int stats_fill_sv_stats(struct proxy *px, struct server *sv, int flags,
- struct field *stats, int len);
-int stats_fill_be_stats(struct proxy *px, int flags, struct field *stats, int len);
-
-extern struct applet http_stats_applet;
-
-void stats_io_handler(struct stream_interface *si);
-int stats_emit_raw_data_field(struct buffer *out, const struct field *f);
-int stats_emit_typed_data_field(struct buffer *out, const struct field *f);
-int stats_emit_field_tags(struct buffer *out, const struct field *f,
- char delim);
-
-#endif /* _PROTO_STATS_H */
+#endif /* _HAPROXY_STATS_H */
/*
* Local variables:
#include <haproxy/listener.h>
#include <haproxy/peers.h>
#include <haproxy/sample.h>
-#include <types/stats.h>
+#include <haproxy/stats-t.h>
#include <haproxy/protocol.h>
#include <proto/proxy.h>
#include <haproxy/peers-t.h>
#include <haproxy/pool.h>
#include <haproxy/session.h>
+#include <haproxy/stats-t.h>
#include <haproxy/tools.h>
#include <haproxy/time.h>
#include <haproxy/uri_auth-t.h>
#include <types/filters.h>
#include <haproxy/global.h>
-#include <types/stats.h>
#include <proto/backend.h>
#include <proto/channel.h>
-#include <proto/stats.h>
#include <proto/filters.h>
#include <proto/lb_map.h>
#include <proto/log.h>
#include <haproxy/h1.h>
#include <haproxy/htx.h>
#include <haproxy/signal.h>
+#include <haproxy/stats-t.h>
#include <haproxy/task.h>
#include <haproxy/vars.h>
#include <haproxy/global.h>
-#include <types/stats.h>
#include <haproxy/arg.h>
#include <proto/backend.h>
-#include <proto/stats.h>
#include <haproxy/fd.h>
#include <proto/log.h>
#include <proto/queue.h>
#include <haproxy/peers.h>
#include <haproxy/sample-t.h>
#include <haproxy/session.h>
+#include <haproxy/stats-t.h>
#include <haproxy/task.h>
#include <haproxy/tools.h>
#include <haproxy/ticks.h>
#include <haproxy/base64.h>
#include <haproxy/global.h>
-#include <types/stats.h>
#include <haproxy/activity.h>
#include <proto/backend.h>
#include <proto/channel.h>
#include <proto/cli.h>
#include <haproxy/compression.h>
-#include <proto/stats.h>
#include <haproxy/fd.h>
#include <haproxy/freq_ctr.h>
#include <proto/log.h>
#include <haproxy/errors.h>
#include <haproxy/http_rules.h>
#include <haproxy/sample.h>
+#include <haproxy/stats-t.h>
#include <haproxy/task.h>
#include <haproxy/tcp_rules.h>
#include <haproxy/time.h>
#include <types/cli.h>
#include <haproxy/global.h>
-#include <types/stats.h>
#include <proto/channel.h>
#include <proto/cli.h>
#include <haproxy/payload.h>
#include <haproxy/sample.h>
#include <haproxy/session.h>
+#include <haproxy/stats-t.h>
#include <haproxy/task.h>
#include <haproxy/tcp_rules.h>
#include <haproxy/tools.h>
#include <types/cli.h>
#include <types/proxy.h>
-#include <types/stats.h>
#include <haproxy/arg.h>
#include <proto/channel.h>
#include <proto/cli.h>
-#include <proto/stats.h>
#include <proto/queue.h>
#include <proto/http_ana.h>
#include <proto/server.h>
#include <haproxy/http.h>
#include <haproxy/net_helper.h>
#include <haproxy/regex.h>
+#include <haproxy/stats.h>
#include <haproxy/time.h>
#include <types/cli.h>
#include <types/proxy.h>
-#include <types/stats.h>
#include <proto/proxy.h>
#include <proto/server.h>
-#include <proto/stats.h>
#include <haproxy/stick_table.h>
/* Contains the class reference of the concat object. */
#include <haproxy/htx.h>
#include <haproxy/net_helper.h>
#include <haproxy/regex.h>
+#include <haproxy/stats.h>
#include <haproxy/uri_auth-t.h>
#include <haproxy/vars.h>
#include <proto/server.h>
#include <proto/stream.h>
#include <proto/stream_interface.h>
-#include <proto/stats.h>
#define TRACE_SOURCE &trace_strm
#include <haproxy/map.h>
#include <haproxy/pattern.h>
#include <haproxy/regex.h>
+#include <haproxy/stats-t.h>
#include <haproxy/tools.h>
#include <types/cli.h>
-#include <types/stats.h>
#include <haproxy/arg.h>
#include <proto/cli.h>
#include <haproxy/task.h>
#include <haproxy/session-t.h>
#include <haproxy/signal.h>
+#include <haproxy/stats-t.h>
#include <haproxy/time.h>
#include <haproxy/tools.h>
#include <haproxy/thread.h>
-#include <types/stats.h>
-
#include <proto/channel.h>
#include <proto/cli.h>
#include <haproxy/fd.h>
#include <haproxy/api.h>
#include <types/cli.h>
#include <haproxy/global.h>
-#include <types/stats.h>
#include <common/cfgparse.h>
#include <haproxy/thread.h>
#include <haproxy/pool.h>
#include <haproxy/list.h>
+#include <haproxy/stats-t.h>
#include <haproxy/tools.h>
#include <haproxy/activity-t.h>
#include <proto/channel.h>
#include <proto/log.h>
#include <proto/stream_interface.h>
-#include <proto/stats.h>
#ifdef CONFIG_HAP_LOCAL_POOLS
/* These are the most common pools, expected to be initialized first. These
#include <haproxy/obj_type-t.h>
#include <haproxy/peers.h>
#include <haproxy/pool.h>
+#include <haproxy/stats-t.h>
#include <haproxy/task.h>
#include <haproxy/time.h>
#include <haproxy/capture-t.h>
#include <types/cli.h>
-#include <types/stats.h>
#include <proto/cli.h>
#include <proto/backend.h>
#include <haproxy/global.h>
#include <haproxy/namespace.h>
#include <haproxy/sample.h>
+#include <haproxy/stats-t.h>
#include <haproxy/task.h>
#include <haproxy/time.h>
#include <types/cli.h>
#include <types/cli.h>
-#include <types/stats.h>
#include <proto/cli.h>
#include <haproxy/port_range.h>
#include <proto/server.h>
#include <proto/stream.h>
#include <proto/stream_interface.h>
-#include <proto/stats.h>
#include <netinet/tcp.h>
#include <import/ebsttree.h>
#include <haproxy/ssl_ckch.h>
#include <haproxy/ssl_crtlist.h>
#include <haproxy/ssl_utils.h>
+#include <haproxy/stats-t.h>
#include <haproxy/task.h>
#include <haproxy/tools.h>
#include <haproxy/ticks.h>
#include <types/cli.h>
#include <types/ssl_sock.h>
-#include <types/stats.h>
#include <haproxy/arg.h>
#include <proto/channel.h>
#include <haproxy/map-t.h>
#include <haproxy/pattern-t.h>
#include <haproxy/session.h>
+#include <haproxy/stats.h>
#include <haproxy/task.h>
#include <haproxy/tools.h>
#include <haproxy/ticks.h>
#include <haproxy/base64.h>
#include <types/cli.h>
-#include <types/stats.h>
#include <proto/backend.h>
#include <proto/channel.h>
#include <proto/cli.h>
-#include <proto/stats.h>
#include <haproxy/fd.h>
#include <haproxy/freq_ctr.h>
#include <proto/log.h>
#include <haproxy/list.h>
#include <haproxy/net_helper.h>
#include <haproxy/peers.h>
+#include <haproxy/stats-t.h>
#include <haproxy/task.h>
#include <haproxy/tcp_rules.h>
#include <haproxy/tools.h>
#include <import/ebsttree.h>
#include <types/cli.h>
-#include <types/stats.h>
#include <haproxy/arg.h>
#include <proto/cli.h>
#include <haproxy/htx.h>
#include <haproxy/pool.h>
#include <haproxy/session.h>
+#include <haproxy/stats-t.h>
#include <haproxy/task.h>
#include <haproxy/tcp_rules.h>
#include <haproxy/vars.h>
#include <types/cli.h>
#include <types/filters.h>
-#include <types/stats.h>
#include <haproxy/activity.h>
#include <haproxy/arg.h>
#include <proto/backend.h>
#include <proto/channel.h>
#include <proto/cli.h>
-#include <proto/stats.h>
#include <haproxy/fd.h>
#include <proto/filters.h>
#include <haproxy/freq_ctr.h>
#include <haproxy/api.h>
#include <haproxy/base64.h>
+#include <haproxy/stats-t.h>
#include <haproxy/uri_auth.h>
-#include <types/stats.h>
#include <proto/log.h>
/*