diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-10-26 16:22:45 +0100 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-10-29 01:10:06 +0100 |
commit | d01acfcc75a6c5798a95a8ccca9be18eba65a0bf (patch) | |
tree | 7fe32b10d89953a2a2dc2bece2b6ae80f77df8a9 /src/vty | |
parent | c8f47b600f8e2ad21266d4c27e960e477e5fe35c (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 'src/vty')
-rw-r--r-- | src/vty/stats_vty.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index a4fd7b05..775184c9 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -128,6 +128,23 @@ DEFUN(cfg_stats_reporter_remote_port, cfg_stats_reporter_remote_port_cmd, argv[0], "remote port"); } +DEFUN(cfg_stats_reporter_mtu, cfg_stats_reporter_mtu_cmd, + "mtu <100-65535>", + "Set the maximum packet size\n" + "Size in byte\n") +{ + return set_srep_parameter_int(vty, stats_reporter_set_mtu, + argv[0], "mtu"); +} + +DEFUN(cfg_no_stats_reporter_mtu, cfg_no_stats_reporter_mtu_cmd, + "no mtu", + NO_STR "Set the maximum packet size\n") +{ + return set_srep_parameter_int(vty, stats_reporter_set_mtu, + 0, "mtu"); +} + DEFUN(cfg_stats_reporter_prefix, cfg_stats_reporter_prefix_cmd, "prefix PREFIX", "Set the item name prefix\n" @@ -312,6 +329,8 @@ void stats_vty_add_cmds() install_element(CFG_STATS_NODE, &cfg_no_stats_reporter_local_ip_cmd); install_element(CFG_STATS_NODE, &cfg_stats_reporter_remote_ip_cmd); install_element(CFG_STATS_NODE, &cfg_stats_reporter_remote_port_cmd); + install_element(CFG_STATS_NODE, &cfg_stats_reporter_mtu_cmd); + install_element(CFG_STATS_NODE, &cfg_no_stats_reporter_mtu_cmd); install_element(CFG_STATS_NODE, &cfg_stats_reporter_prefix_cmd); install_element(CFG_STATS_NODE, &cfg_no_stats_reporter_prefix_cmd); install_element(CFG_STATS_NODE, &cfg_stats_reporter_enable_cmd); |