aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-11-08 23:14:29 +0300
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-11-09 04:35:07 +0300
commitbfc837739843fa96c04a9e348dcdae927a1169ea (patch)
tree522cf250dd96e622a34af6b5c718b38d8bda997b /tests
parent4e9247228102e9b7440d19ca1032ff0172768380 (diff)
stats: allow configuring reporter's name in the VTY
This allows configuring more than one reporter of the given type. Change-Id: Ia815c24dc974648985539913012b3b074ea317a9 Related: SYS#5713
Diffstat (limited to 'tests')
-rw-r--r--tests/stats/stats_vty_test.vty74
1 files changed, 70 insertions, 4 deletions
diff --git a/tests/stats/stats_vty_test.vty b/tests/stats/stats_vty_test.vty
index 4ec03c99..017b1886 100644
--- a/tests/stats/stats_vty_test.vty
+++ b/tests/stats/stats_vty_test.vty
@@ -2,10 +2,10 @@ stats_vty_test> en
stats_vty_test# configure terminal
stats_vty_test(config)# list
...
- stats reporter statsd
- no stats reporter statsd
- stats reporter log
- no stats reporter log
+ stats reporter statsd [NAME]
+ no stats reporter statsd [NAME]
+ stats reporter log [NAME]
+ no stats reporter log [NAME]
stats interval <0-65535>
...
@@ -148,6 +148,72 @@ stats reporter log
...
+stats_vty_test(config)# ### Create an additional statsd reporter
+stats_vty_test(config)# stats reporter statsd statsd-foo
+stats_vty_test(config-stats)# level global
+stats_vty_test(config-stats)# prefix statsd-one-prefix
+stats_vty_test(config-stats)# remote-ip 192.168.2.200
+stats_vty_test(config-stats)# remote-port 9696
+stats_vty_test(config-stats)# flush-period 1
+stats_vty_test(config-stats)# exit
+
+stats_vty_test(config)# ### Create an additional log reporter
+stats_vty_test(config)# stats reporter log log-bar
+stats_vty_test(config-stats)# level global
+stats_vty_test(config-stats)# prefix log-bar-prefix
+stats_vty_test(config-stats)# flush-period 2
+stats_vty_test(config-stats)# exit
+
+stats_vty_test(config)# ### Create an additional log reporter
+stats_vty_test(config)# stats reporter log log-zoo
+stats_vty_test(config-stats)# level global
+stats_vty_test(config-stats)# prefix log-zoo-prefix
+stats_vty_test(config-stats)# flush-period 3
+stats_vty_test(config-stats)# exit
+
+stats_vty_test(config)# ### We should have 5 reporters now
+stats_vty_test(config)# show running-config
+...
+stats reporter statsd
+ disable
+ remote-ip 192.168.1.200
+ remote-port 6969
+ level subscriber
+ prefix statsd-prefix
+ enable
+stats reporter log
+ disable
+ level peer
+ prefix log-prefix
+ enable
+stats reporter statsd statsd-foo
+ disable
+ remote-ip 192.168.2.200
+ remote-port 9696
+ level global
+ prefix statsd-one-prefix
+ flush-period 1
+stats reporter log log-bar
+ disable
+ level global
+ prefix log-bar-prefix
+ flush-period 2
+stats reporter log log-zoo
+ disable
+ level global
+ prefix log-zoo-prefix
+ flush-period 3
+...
+
+
+stats_vty_test(config)# ### Test removing reporters
+stats_vty_test(config)# no stats reporter statsd statsd-foo
+stats_vty_test(config)# no stats reporter log log-bar
+stats_vty_test(config)# no stats reporter log log-zoo
+stats_vty_test(config)# show running-config
+... !(foo|bar|zoo)
+
+
stats_vty_test(config)# stats interval 1337
stats_vty_test(config)# show running-config
...