aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-10-26 16:22:45 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-10-29 01:10:06 +0100
commitd01acfcc75a6c5798a95a8ccca9be18eba65a0bf (patch)
tree7fe32b10d89953a2a2dc2bece2b6ae80f77df8a9 /include/osmocom
parentc8f47b600f8e2ad21266d4c27e960e477e5fe35c (diff)
stats: Support statsd Multi-Metric Packets
If the MTU is given, combine several messages into a single UDP packet until the limit is reached. Flush all reporters after the values have been scanned. New vty commands (node config-stats): mtu <100-65535> Enable multi-metric packets and set the maximum packet size (in byte) no mtu Disable multi-metric packets Note that single messages that are longer than the given MTU (minus 28 octets protocol overhead) will be dropped. Sponsored-by: On-Waves ehf
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/core/stats.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/osmocom/core/stats.h b/include/osmocom/core/stats.h
index 489e0e41..ed461ddc 100644
--- a/include/osmocom/core/stats.h
+++ b/include/osmocom/core/stats.h
@@ -22,6 +22,8 @@
#include <sys/socket.h>
#include <osmocom/core/linuxlist.h>
+struct msgb;
+
enum stats_reporter_type {
STATS_REPORTER_STATSD,
};
@@ -45,6 +47,8 @@ struct stats_reporter {
struct sockaddr bind_addr;
int bind_addr_len;
int fd;
+ struct msgb *buffer;
+ int agg_enabled;
struct llist_head list;
};
@@ -71,6 +75,7 @@ struct stats_reporter *stats_reporter_find(enum stats_reporter_type type,
int stats_reporter_set_remote_addr(struct stats_reporter *srep, const char *addr);
int stats_reporter_set_remote_port(struct stats_reporter *srep, int port);
int stats_reporter_set_local_addr(struct stats_reporter *srep, const char *addr);
+int stats_reporter_set_mtu(struct stats_reporter *srep, int mtu);
int stats_reporter_set_name_prefix(struct stats_reporter *srep, const char *prefix);
int stats_reporter_enable(struct stats_reporter *srep);
int stats_reporter_disable(struct stats_reporter *srep);