blob: e0239bfb29e81aa3ca74eb89c91c9fe9d75db52c [file] [log] [blame]
Jacob Erlbeck45513e62015-10-19 15:14:13 +02001/* OpenBSC stats helper for the VTY */
2/* (C) 2009-2010 by Harald Welte <laforge@gnumonks.org>
3 * (C) 2009-2014 by Holger Hans Peter Freyther
4 * (C) 2015 by Sysmocom s.f.m.c. GmbH
5 * All Rights Reserved
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 */
22
23#include <stdlib.h>
24#include <string.h>
25
26#include "../../config.h"
27
28#include <osmocom/vty/command.h>
29#include <osmocom/vty/buffer.h>
30#include <osmocom/vty/vty.h>
31#include <osmocom/vty/telnet_interface.h>
Jacob Erlbeckadc900e2015-10-20 19:05:52 +020032#include <osmocom/vty/telnet_interface.h>
Jacob Erlbeck45513e62015-10-19 15:14:13 +020033#include <osmocom/vty/misc.h>
34
Jacob Erlbeckadc900e2015-10-20 19:05:52 +020035#include <osmocom/core/stats.h>
36
Jacob Erlbeck45513e62015-10-19 15:14:13 +020037#define CFG_STATS_STR "Configure stats sub-system\n"
38#define CFG_REPORTER_STR "Configure a stats reporter\n"
39
40#define SHOW_STATS_STR "Show statistical values\n"
41
Jacob Erlbeckadc900e2015-10-20 19:05:52 +020042struct cmd_node cfg_stats_node = {
43 CFG_STATS_NODE,
44 "%s(config-stats)# ",
45 1
46};
47
Jacob Erlbeckbc9d9ac2015-11-02 14:49:35 +010048static const struct value_string stats_class_strs[] = {
49 { OSMO_STATS_CLASS_GLOBAL, "global" },
50 { OSMO_STATS_CLASS_PEER, "peer" },
51 { OSMO_STATS_CLASS_SUBSCRIBER, "subscriber" },
52 { 0, NULL }
53};
54
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +010055static struct osmo_stats_reporter *osmo_stats_vty2srep(struct vty *vty)
Jacob Erlbeckadc900e2015-10-20 19:05:52 +020056{
57 if (vty->node == CFG_STATS_NODE)
58 return vty->index;
59
60 return NULL;
61}
62
63static int set_srep_parameter_str(struct vty *vty,
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +010064 int (*fun)(struct osmo_stats_reporter *, const char *),
Jacob Erlbeckadc900e2015-10-20 19:05:52 +020065 const char *val, const char *param_name)
66{
67 int rc;
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +010068 struct osmo_stats_reporter *srep = osmo_stats_vty2srep(vty);
Jacob Erlbeckadc900e2015-10-20 19:05:52 +020069 OSMO_ASSERT(srep);
70
71 rc = fun(srep, val);
72 if (rc < 0) {
73 vty_out(vty, "%% Unable to set %s: %s%s",
74 param_name, strerror(-rc), VTY_NEWLINE);
75 return CMD_WARNING;
76 }
77
78 return CMD_SUCCESS;
79}
80
81static int set_srep_parameter_int(struct vty *vty,
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +010082 int (*fun)(struct osmo_stats_reporter *, int),
Jacob Erlbeckadc900e2015-10-20 19:05:52 +020083 const char *val, const char *param_name)
84{
85 int rc;
86 int int_val;
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +010087 struct osmo_stats_reporter *srep = osmo_stats_vty2srep(vty);
Jacob Erlbeckadc900e2015-10-20 19:05:52 +020088 OSMO_ASSERT(srep);
89
90 int_val = atoi(val);
91
92 rc = fun(srep, int_val);
93 if (rc < 0) {
94 vty_out(vty, "%% Unable to set %s: %s%s",
95 param_name, strerror(-rc), VTY_NEWLINE);
96 return CMD_WARNING;
97 }
98
99 return CMD_SUCCESS;
100}
101
102DEFUN(cfg_stats_reporter_local_ip, cfg_stats_reporter_local_ip_cmd,
103 "local-ip ADDR",
104 "Set the IP address to which we bind locally\n"
105 "IP Address\n")
106{
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100107 return set_srep_parameter_str(vty, osmo_stats_reporter_set_local_addr,
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200108 argv[0], "local address");
109}
110
111DEFUN(cfg_no_stats_reporter_local_ip, cfg_no_stats_reporter_local_ip_cmd,
112 "no local-ip",
113 NO_STR
114 "Set the IP address to which we bind locally\n")
115{
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100116 return set_srep_parameter_str(vty, osmo_stats_reporter_set_local_addr,
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200117 NULL, "local address");
118}
119
120DEFUN(cfg_stats_reporter_remote_ip, cfg_stats_reporter_remote_ip_cmd,
121 "remote-ip ADDR",
122 "Set the remote IP address to which we connect\n"
123 "IP Address\n")
124{
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100125 return set_srep_parameter_str(vty, osmo_stats_reporter_set_remote_addr,
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200126 argv[0], "remote address");
127}
128
129DEFUN(cfg_stats_reporter_remote_port, cfg_stats_reporter_remote_port_cmd,
130 "remote-port <1-65535>",
131 "Set the remote port to which we connect\n"
132 "Remote port number\n")
133{
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100134 return set_srep_parameter_int(vty, osmo_stats_reporter_set_remote_port,
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200135 argv[0], "remote port");
136}
137
Jacob Erlbeckd01acfc2015-10-26 16:22:45 +0100138DEFUN(cfg_stats_reporter_mtu, cfg_stats_reporter_mtu_cmd,
139 "mtu <100-65535>",
140 "Set the maximum packet size\n"
141 "Size in byte\n")
142{
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100143 return set_srep_parameter_int(vty, osmo_stats_reporter_set_mtu,
Jacob Erlbeckd01acfc2015-10-26 16:22:45 +0100144 argv[0], "mtu");
145}
146
147DEFUN(cfg_no_stats_reporter_mtu, cfg_no_stats_reporter_mtu_cmd,
148 "no mtu",
149 NO_STR "Set the maximum packet size\n")
150{
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100151 return set_srep_parameter_int(vty, osmo_stats_reporter_set_mtu,
Holger Hans Peter Freyther8f0374f2015-11-02 15:53:09 +0100152 "0", "mtu");
Jacob Erlbeckd01acfc2015-10-26 16:22:45 +0100153}
154
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200155DEFUN(cfg_stats_reporter_prefix, cfg_stats_reporter_prefix_cmd,
156 "prefix PREFIX",
157 "Set the item name prefix\n"
158 "The prefix string\n")
159{
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100160 return set_srep_parameter_str(vty, osmo_stats_reporter_set_name_prefix,
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200161 argv[0], "prefix string");
162}
163
164DEFUN(cfg_no_stats_reporter_prefix, cfg_no_stats_reporter_prefix_cmd,
165 "no prefix",
166 NO_STR
167 "Set the item name prefix\n")
168{
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100169 return set_srep_parameter_str(vty, osmo_stats_reporter_set_name_prefix,
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200170 "", "prefix string");
171}
172
Jacob Erlbeckbc9d9ac2015-11-02 14:49:35 +0100173DEFUN(cfg_stats_reporter_level, cfg_stats_reporter_level_cmd,
174 "level (global|peer|subscriber)",
175 "Set the maximum group level\n"
176 "Report global groups only\n"
177 "Report global and network peer related groups\n"
178 "Report global, peer, and subscriber groups\n")
179{
180 int level = get_string_value(stats_class_strs, argv[0]);
181 int rc;
182 struct osmo_stats_reporter *srep = osmo_stats_vty2srep(vty);
183
184 OSMO_ASSERT(srep);
185 rc = osmo_stats_reporter_set_max_class(srep, level);
186 if (rc < 0) {
187 vty_out(vty, "%% Unable to set level: %s%s",
188 strerror(-rc), VTY_NEWLINE);
189 return CMD_WARNING;
190 }
191
192 return 0;
193}
194
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200195DEFUN(cfg_stats_reporter_enable, cfg_stats_reporter_enable_cmd,
196 "enable",
197 "Enable the reporter\n")
198{
199 int rc;
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100200 struct osmo_stats_reporter *srep = osmo_stats_vty2srep(vty);
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200201 OSMO_ASSERT(srep);
202
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100203 rc = osmo_stats_reporter_enable(srep);
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200204 if (rc < 0) {
205 vty_out(vty, "%% Unable to enable the reporter: %s%s",
206 strerror(-rc), VTY_NEWLINE);
207 return CMD_WARNING;
208 }
209
210 return CMD_SUCCESS;
211}
212
213DEFUN(cfg_stats_reporter_disable, cfg_stats_reporter_disable_cmd,
214 "disable",
215 "Disable the reporter\n")
216{
217 int rc;
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100218 struct osmo_stats_reporter *srep = osmo_stats_vty2srep(vty);
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200219 OSMO_ASSERT(srep);
220
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100221 rc = osmo_stats_reporter_disable(srep);
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200222 if (rc < 0) {
223 vty_out(vty, "%% Unable to disable the reporter: %s%s",
224 strerror(-rc), VTY_NEWLINE);
225 return CMD_WARNING;
226 }
227
228 return CMD_SUCCESS;
229}
230
231DEFUN(cfg_stats_reporter_statsd, cfg_stats_reporter_statsd_cmd,
232 "stats reporter statsd",
233 CFG_STATS_STR CFG_REPORTER_STR "Report to a STATSD server\n")
234{
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100235 struct osmo_stats_reporter *srep;
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200236
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100237 srep = osmo_stats_reporter_find(OSMO_STATS_REPORTER_STATSD, NULL);
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200238 if (!srep) {
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100239 srep = osmo_stats_reporter_create_statsd(NULL);
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200240 if (!srep) {
241 vty_out(vty, "%% Unable to create statsd reporter%s",
242 VTY_NEWLINE);
243 return CMD_WARNING;
244 }
Jacob Erlbeckbc9d9ac2015-11-02 14:49:35 +0100245 srep->max_class = OSMO_STATS_CLASS_GLOBAL;
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100246 /* TODO: if needed, add osmo_stats_add_reporter(srep); */
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200247 }
248
249 vty->index = srep;
250 vty->node = CFG_STATS_NODE;
251
252 return CMD_SUCCESS;
253}
254
Jacob Erlbeckb1dbfb42015-10-26 11:58:38 +0100255DEFUN(cfg_stats_interval, cfg_stats_interval_cmd,
256 "stats interval <1-65535>",
257 CFG_STATS_STR "Set the reporting interval\n"
258 "Interval in seconds\n")
259{
260 int rc;
261 int interval = atoi(argv[0]);
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100262 rc = osmo_stats_set_interval(interval);
Jacob Erlbeckb1dbfb42015-10-26 11:58:38 +0100263 if (rc < 0) {
264 vty_out(vty, "%% Unable to set interval: %s%s",
265 strerror(-rc), VTY_NEWLINE);
266 return CMD_WARNING;
267 }
268
269 return CMD_SUCCESS;
270}
271
272
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200273DEFUN(cfg_no_stats_reporter_statsd, cfg_no_stats_reporter_statsd_cmd,
274 "no stats reporter statsd",
275 NO_STR CFG_STATS_STR CFG_REPORTER_STR "Report to a STATSD server\n")
276{
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100277 struct osmo_stats_reporter *srep;
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200278
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100279 srep = osmo_stats_reporter_find(OSMO_STATS_REPORTER_STATSD, NULL);
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200280 if (!srep) {
281 vty_out(vty, "%% No statsd logging active%s",
282 VTY_NEWLINE);
283 return CMD_WARNING;
284 }
285
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100286 osmo_stats_reporter_free(srep);
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200287
288 return CMD_SUCCESS;
289}
290
Jacob Erlbeckbc4f7ae2015-10-28 21:47:45 +0100291DEFUN(cfg_stats_reporter_log, cfg_stats_reporter_log_cmd,
292 "stats reporter log",
293 CFG_STATS_STR CFG_REPORTER_STR "Report to the logger\n")
294{
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100295 struct osmo_stats_reporter *srep;
Jacob Erlbeckbc4f7ae2015-10-28 21:47:45 +0100296
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100297 srep = osmo_stats_reporter_find(OSMO_STATS_REPORTER_LOG, NULL);
Jacob Erlbeckbc4f7ae2015-10-28 21:47:45 +0100298 if (!srep) {
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100299 srep = osmo_stats_reporter_create_log(NULL);
Jacob Erlbeckbc4f7ae2015-10-28 21:47:45 +0100300 if (!srep) {
301 vty_out(vty, "%% Unable to create log reporter%s",
302 VTY_NEWLINE);
303 return CMD_WARNING;
304 }
Jacob Erlbeckbc9d9ac2015-11-02 14:49:35 +0100305 srep->max_class = OSMO_STATS_CLASS_GLOBAL;
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100306 /* TODO: if needed, add osmo_stats_add_reporter(srep); */
Jacob Erlbeckbc4f7ae2015-10-28 21:47:45 +0100307 }
308
309 vty->index = srep;
310 vty->node = CFG_STATS_NODE;
311
312 return CMD_SUCCESS;
313}
314
315DEFUN(cfg_no_stats_reporter_log, cfg_no_stats_reporter_log_cmd,
316 "no stats reporter log",
317 NO_STR CFG_STATS_STR CFG_REPORTER_STR "Report to the logger\n")
318{
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100319 struct osmo_stats_reporter *srep;
Jacob Erlbeckbc4f7ae2015-10-28 21:47:45 +0100320
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100321 srep = osmo_stats_reporter_find(OSMO_STATS_REPORTER_LOG, NULL);
Jacob Erlbeckbc4f7ae2015-10-28 21:47:45 +0100322 if (!srep) {
323 vty_out(vty, "%% No log reporting active%s",
324 VTY_NEWLINE);
325 return CMD_WARNING;
326 }
327
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100328 osmo_stats_reporter_free(srep);
Jacob Erlbeckbc4f7ae2015-10-28 21:47:45 +0100329
330 return CMD_SUCCESS;
331}
332
Jacob Erlbeck45513e62015-10-19 15:14:13 +0200333DEFUN(show_stats,
334 show_stats_cmd,
335 "show stats",
336 SHOW_STR SHOW_STATS_STR)
337{
338 vty_out_statistics_full(vty, "");
339
340 return CMD_SUCCESS;
341}
342
Jacob Erlbeck59b90bc2015-11-03 16:21:40 +0100343DEFUN(show_stats_level,
344 show_stats_level_cmd,
345 "show stats level (global|peer|subscriber)",
346 SHOW_STR SHOW_STATS_STR
Holger Hans Peter Freyther83481942015-11-07 21:10:01 +0100347 "Set the maximum group level\n"
Jacob Erlbeck59b90bc2015-11-03 16:21:40 +0100348 "Show global groups only\n"
349 "Show global and network peer related groups\n"
350 "Show global, peer, and subscriber groups\n")
351{
352 int level = get_string_value(stats_class_strs, argv[0]);
353 vty_out_statistics_partial(vty, "", level);
354
355 return CMD_SUCCESS;
356}
357
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100358static int config_write_stats_reporter(struct vty *vty, struct osmo_stats_reporter *srep)
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200359{
360 if (srep == NULL)
361 return 0;
362
363 switch (srep->type) {
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100364 case OSMO_STATS_REPORTER_STATSD:
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200365 vty_out(vty, "stats reporter statsd%s", VTY_NEWLINE);
366 break;
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100367 case OSMO_STATS_REPORTER_LOG:
Jacob Erlbeckbc4f7ae2015-10-28 21:47:45 +0100368 vty_out(vty, "stats reporter log%s", VTY_NEWLINE);
369 break;
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200370 }
371
372 vty_out(vty, " disable%s", VTY_NEWLINE);
373
Jacob Erlbecked197fd2015-10-27 14:43:24 +0100374 if (srep->have_net_config) {
375 if (srep->dest_addr_str)
376 vty_out(vty, " remote-ip %s%s",
377 srep->dest_addr_str, VTY_NEWLINE);
378 if (srep->dest_port)
379 vty_out(vty, " remote-port %d%s",
380 srep->dest_port, VTY_NEWLINE);
381 if (srep->bind_addr_str)
382 vty_out(vty, " local-ip %s%s",
383 srep->bind_addr_str, VTY_NEWLINE);
384 if (srep->mtu)
385 vty_out(vty, " mtu %d%s",
386 srep->mtu, VTY_NEWLINE);
387 }
388
Jacob Erlbeckbc9d9ac2015-11-02 14:49:35 +0100389 if (srep->max_class)
390 vty_out(vty, " level %s%s",
391 get_value_string(stats_class_strs, srep->max_class),
392 VTY_NEWLINE);
393
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200394 if (srep->name_prefix && *srep->name_prefix)
395 vty_out(vty, " prefix %s%s",
396 srep->name_prefix, VTY_NEWLINE);
397 else
398 vty_out(vty, " no prefix%s", VTY_NEWLINE);
399
400 if (srep->enabled)
401 vty_out(vty, " enable%s", VTY_NEWLINE);
402
403 return 1;
404}
405
406static int config_write_stats(struct vty *vty)
407{
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100408 struct osmo_stats_reporter *srep;
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200409
Jacob Erlbeckbc4f7ae2015-10-28 21:47:45 +0100410 /* TODO: loop through all reporters */
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100411 srep = osmo_stats_reporter_find(OSMO_STATS_REPORTER_STATSD, NULL);
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200412 config_write_stats_reporter(vty, srep);
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100413 srep = osmo_stats_reporter_find(OSMO_STATS_REPORTER_LOG, NULL);
Jacob Erlbeckbc4f7ae2015-10-28 21:47:45 +0100414 config_write_stats_reporter(vty, srep);
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200415
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100416 vty_out(vty, "stats interval %d%s", osmo_stats_config->interval, VTY_NEWLINE);
Jacob Erlbeckb1dbfb42015-10-26 11:58:38 +0100417
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200418 return 1;
419}
420
Jacob Erlbeckfc9533d2015-10-29 00:55:58 +0100421void osmo_stats_vty_add_cmds()
Jacob Erlbeck45513e62015-10-19 15:14:13 +0200422{
423 install_element_ve(&show_stats_cmd);
Jacob Erlbeck59b90bc2015-11-03 16:21:40 +0100424 install_element_ve(&show_stats_level_cmd);
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200425
426 install_element(CONFIG_NODE, &cfg_stats_reporter_statsd_cmd);
427 install_element(CONFIG_NODE, &cfg_no_stats_reporter_statsd_cmd);
Jacob Erlbeckbc4f7ae2015-10-28 21:47:45 +0100428 install_element(CONFIG_NODE, &cfg_stats_reporter_log_cmd);
429 install_element(CONFIG_NODE, &cfg_no_stats_reporter_log_cmd);
Jacob Erlbeckb1dbfb42015-10-26 11:58:38 +0100430 install_element(CONFIG_NODE, &cfg_stats_interval_cmd);
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200431
432 install_node(&cfg_stats_node, config_write_stats);
433 vty_install_default(CFG_STATS_NODE);
434
435 install_element(CFG_STATS_NODE, &cfg_stats_reporter_local_ip_cmd);
436 install_element(CFG_STATS_NODE, &cfg_no_stats_reporter_local_ip_cmd);
437 install_element(CFG_STATS_NODE, &cfg_stats_reporter_remote_ip_cmd);
438 install_element(CFG_STATS_NODE, &cfg_stats_reporter_remote_port_cmd);
Jacob Erlbeckd01acfc2015-10-26 16:22:45 +0100439 install_element(CFG_STATS_NODE, &cfg_stats_reporter_mtu_cmd);
440 install_element(CFG_STATS_NODE, &cfg_no_stats_reporter_mtu_cmd);
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200441 install_element(CFG_STATS_NODE, &cfg_stats_reporter_prefix_cmd);
442 install_element(CFG_STATS_NODE, &cfg_no_stats_reporter_prefix_cmd);
Jacob Erlbeckbc9d9ac2015-11-02 14:49:35 +0100443 install_element(CFG_STATS_NODE, &cfg_stats_reporter_level_cmd);
Jacob Erlbeckadc900e2015-10-20 19:05:52 +0200444 install_element(CFG_STATS_NODE, &cfg_stats_reporter_enable_cmd);
445 install_element(CFG_STATS_NODE, &cfg_stats_reporter_disable_cmd);
Jacob Erlbeck45513e62015-10-19 15:14:13 +0200446}