Vadim Yanitskiy | ac3a3fc | 2021-11-09 03:35:44 +0300 | [diff] [blame] | 1 | stats_vty_test> en |
| 2 | stats_vty_test# configure terminal |
| 3 | stats_vty_test(config)# list |
| 4 | ... |
Vadim Yanitskiy | bfc8377 | 2021-11-08 23:14:29 +0300 | [diff] [blame] | 5 | stats reporter statsd [NAME] |
| 6 | no stats reporter statsd [NAME] |
| 7 | stats reporter log [NAME] |
| 8 | no stats reporter log [NAME] |
Vadim Yanitskiy | ac3a3fc | 2021-11-09 03:35:44 +0300 | [diff] [blame] | 9 | stats interval <0-65535> |
Philipp Maier | b1ef8f5 | 2021-12-06 16:31:02 +0100 | [diff] [blame] | 10 | stats-tcp interval <0-65535> |
Vadim Yanitskiy | ac3a3fc | 2021-11-09 03:35:44 +0300 | [diff] [blame] | 11 | ... |
| 12 | |
| 13 | stats_vty_test(config)# ### No reporters shall be configured by default |
| 14 | stats_vty_test(config)# show running-config |
| 15 | ... !stats reporter |
| 16 | |
| 17 | |
| 18 | stats_vty_test(config)# ### Create a statsd reporter |
| 19 | stats_vty_test(config)# stats reporter statsd |
| 20 | stats_vty_test(config-stats)# list |
| 21 | ... |
| 22 | local-ip ADDR |
| 23 | no local-ip |
| 24 | remote-ip ADDR |
| 25 | remote-port <1-65535> |
| 26 | mtu <100-65535> |
| 27 | no mtu |
| 28 | prefix PREFIX |
| 29 | no prefix |
| 30 | level (global|peer|subscriber) |
| 31 | enable |
| 32 | disable |
| 33 | flush-period <0-65535> |
| 34 | ... |
| 35 | |
| 36 | stats_vty_test(config-stats)# show running-config |
| 37 | ... |
Vadim Yanitskiy | 4f1c4e3 | 2021-11-09 13:38:40 +0300 | [diff] [blame] | 38 | stats interval 5 |
Vadim Yanitskiy | ac3a3fc | 2021-11-09 03:35:44 +0300 | [diff] [blame] | 39 | stats reporter statsd |
Vadim Yanitskiy | ac3a3fc | 2021-11-09 03:35:44 +0300 | [diff] [blame] | 40 | level global |
| 41 | no prefix |
Vadim Yanitskiy | d6b0059 | 2021-11-09 13:46:55 +0300 | [diff] [blame] | 42 | disable |
Vadim Yanitskiy | ac3a3fc | 2021-11-09 03:35:44 +0300 | [diff] [blame] | 43 | ... |
| 44 | |
| 45 | stats_vty_test(config-stats)# level subscriber |
| 46 | stats_vty_test(config-stats)# prefix statsd-prefix |
| 47 | stats_vty_test(config-stats)# show running-config |
| 48 | ... |
| 49 | stats reporter statsd |
Vadim Yanitskiy | ac3a3fc | 2021-11-09 03:35:44 +0300 | [diff] [blame] | 50 | level subscriber |
| 51 | prefix statsd-prefix |
| 52 | ... |
| 53 | |
| 54 | stats_vty_test(config-stats)# remote-ip 192.168.1.200 |
| 55 | stats_vty_test(config-stats)# remote-port 6969 |
| 56 | stats_vty_test(config-stats)# show running-config |
| 57 | ... |
| 58 | stats reporter statsd |
Vadim Yanitskiy | ac3a3fc | 2021-11-09 03:35:44 +0300 | [diff] [blame] | 59 | remote-ip 192.168.1.200 |
| 60 | remote-port 6969 |
| 61 | ... !local-ip |
| 62 | |
| 63 | stats_vty_test(config-stats)# local-ip 192.168.1.100 |
| 64 | stats_vty_test(config-stats)# show running-config |
| 65 | ... |
| 66 | stats reporter statsd |
Vadim Yanitskiy | ac3a3fc | 2021-11-09 03:35:44 +0300 | [diff] [blame] | 67 | remote-ip 192.168.1.200 |
| 68 | remote-port 6969 |
| 69 | local-ip 192.168.1.100 |
| 70 | ... |
| 71 | |
| 72 | stats_vty_test(config-stats)# no local-ip |
| 73 | stats_vty_test(config-stats)# show running-config |
| 74 | ... |
| 75 | stats reporter statsd |
| 76 | ... !local-ip |
| 77 | |
| 78 | stats_vty_test(config-stats)# mtu 1337 |
| 79 | stats_vty_test(config-stats)# show running-config |
| 80 | ... |
| 81 | stats reporter statsd |
Vadim Yanitskiy | ac3a3fc | 2021-11-09 03:35:44 +0300 | [diff] [blame] | 82 | remote-ip 192.168.1.200 |
| 83 | remote-port 6969 |
| 84 | mtu 1337 |
| 85 | ... |
| 86 | |
| 87 | stats_vty_test(config-stats)# no mtu |
| 88 | stats_vty_test(config-stats)# show running-config |
| 89 | ... |
| 90 | stats reporter statsd |
| 91 | ... !mtu |
| 92 | |
| 93 | stats_vty_test(config-stats)# flush-period 43556 |
| 94 | stats_vty_test(config-stats)# show running-config |
| 95 | ... |
| 96 | stats reporter statsd |
Vadim Yanitskiy | ac3a3fc | 2021-11-09 03:35:44 +0300 | [diff] [blame] | 97 | remote-ip 192.168.1.200 |
| 98 | remote-port 6969 |
| 99 | level subscriber |
| 100 | prefix statsd-prefix |
| 101 | flush-period 43556 |
| 102 | ... |
| 103 | |
| 104 | stats_vty_test(config-stats)# flush-period 0 |
| 105 | stats_vty_test(config-stats)# show running-config |
| 106 | ... |
| 107 | stats reporter statsd |
| 108 | ... !flush-period |
| 109 | |
| 110 | stats_vty_test(config-stats)# enable |
| 111 | stats_vty_test(config-stats)# exit |
| 112 | stats_vty_test(config)# show running-config |
| 113 | ... |
| 114 | stats reporter statsd |
Vadim Yanitskiy | ac3a3fc | 2021-11-09 03:35:44 +0300 | [diff] [blame] | 115 | remote-ip 192.168.1.200 |
| 116 | remote-port 6969 |
| 117 | level subscriber |
| 118 | prefix statsd-prefix |
| 119 | enable |
| 120 | ... |
| 121 | |
| 122 | |
| 123 | stats_vty_test(config)# ### Create a statsd reporter |
| 124 | stats_vty_test(config)# stats reporter log |
| 125 | stats_vty_test(config-stats)# level peer |
| 126 | stats_vty_test(config-stats)# prefix log-prefix |
| 127 | stats_vty_test(config-stats)# enable |
| 128 | stats_vty_test(config-stats)# exit |
| 129 | stats_vty_test(config)# show running-config |
| 130 | ... |
| 131 | stats reporter statsd |
Vadim Yanitskiy | ac3a3fc | 2021-11-09 03:35:44 +0300 | [diff] [blame] | 132 | remote-ip 192.168.1.200 |
| 133 | remote-port 6969 |
| 134 | level subscriber |
| 135 | prefix statsd-prefix |
| 136 | enable |
| 137 | stats reporter log |
Vadim Yanitskiy | ac3a3fc | 2021-11-09 03:35:44 +0300 | [diff] [blame] | 138 | level peer |
| 139 | prefix log-prefix |
| 140 | enable |
| 141 | ... |
| 142 | |
| 143 | |
Vadim Yanitskiy | bfc8377 | 2021-11-08 23:14:29 +0300 | [diff] [blame] | 144 | stats_vty_test(config)# ### Create an additional statsd reporter |
| 145 | stats_vty_test(config)# stats reporter statsd statsd-foo |
| 146 | stats_vty_test(config-stats)# level global |
| 147 | stats_vty_test(config-stats)# prefix statsd-one-prefix |
| 148 | stats_vty_test(config-stats)# remote-ip 192.168.2.200 |
| 149 | stats_vty_test(config-stats)# remote-port 9696 |
| 150 | stats_vty_test(config-stats)# flush-period 1 |
| 151 | stats_vty_test(config-stats)# exit |
| 152 | |
| 153 | stats_vty_test(config)# ### Create an additional log reporter |
| 154 | stats_vty_test(config)# stats reporter log log-bar |
| 155 | stats_vty_test(config-stats)# level global |
| 156 | stats_vty_test(config-stats)# prefix log-bar-prefix |
| 157 | stats_vty_test(config-stats)# flush-period 2 |
| 158 | stats_vty_test(config-stats)# exit |
| 159 | |
| 160 | stats_vty_test(config)# ### Create an additional log reporter |
| 161 | stats_vty_test(config)# stats reporter log log-zoo |
| 162 | stats_vty_test(config-stats)# level global |
| 163 | stats_vty_test(config-stats)# prefix log-zoo-prefix |
| 164 | stats_vty_test(config-stats)# flush-period 3 |
| 165 | stats_vty_test(config-stats)# exit |
| 166 | |
| 167 | stats_vty_test(config)# ### We should have 5 reporters now |
| 168 | stats_vty_test(config)# show running-config |
| 169 | ... |
| 170 | stats reporter statsd |
Vadim Yanitskiy | bfc8377 | 2021-11-08 23:14:29 +0300 | [diff] [blame] | 171 | remote-ip 192.168.1.200 |
| 172 | remote-port 6969 |
| 173 | level subscriber |
| 174 | prefix statsd-prefix |
| 175 | enable |
| 176 | stats reporter log |
Vadim Yanitskiy | bfc8377 | 2021-11-08 23:14:29 +0300 | [diff] [blame] | 177 | level peer |
| 178 | prefix log-prefix |
| 179 | enable |
| 180 | stats reporter statsd statsd-foo |
Vadim Yanitskiy | bfc8377 | 2021-11-08 23:14:29 +0300 | [diff] [blame] | 181 | remote-ip 192.168.2.200 |
| 182 | remote-port 9696 |
| 183 | level global |
| 184 | prefix statsd-one-prefix |
| 185 | flush-period 1 |
Vadim Yanitskiy | bfc8377 | 2021-11-08 23:14:29 +0300 | [diff] [blame] | 186 | disable |
Vadim Yanitskiy | d6b0059 | 2021-11-09 13:46:55 +0300 | [diff] [blame] | 187 | stats reporter log log-bar |
Vadim Yanitskiy | bfc8377 | 2021-11-08 23:14:29 +0300 | [diff] [blame] | 188 | level global |
| 189 | prefix log-bar-prefix |
| 190 | flush-period 2 |
Vadim Yanitskiy | bfc8377 | 2021-11-08 23:14:29 +0300 | [diff] [blame] | 191 | disable |
Vadim Yanitskiy | d6b0059 | 2021-11-09 13:46:55 +0300 | [diff] [blame] | 192 | stats reporter log log-zoo |
Vadim Yanitskiy | bfc8377 | 2021-11-08 23:14:29 +0300 | [diff] [blame] | 193 | level global |
| 194 | prefix log-zoo-prefix |
| 195 | flush-period 3 |
Vadim Yanitskiy | d6b0059 | 2021-11-09 13:46:55 +0300 | [diff] [blame] | 196 | disable |
Vadim Yanitskiy | bfc8377 | 2021-11-08 23:14:29 +0300 | [diff] [blame] | 197 | ... |
| 198 | |
| 199 | |
| 200 | stats_vty_test(config)# ### Test removing reporters |
| 201 | stats_vty_test(config)# no stats reporter statsd statsd-foo |
| 202 | stats_vty_test(config)# no stats reporter log log-bar |
| 203 | stats_vty_test(config)# no stats reporter log log-zoo |
| 204 | stats_vty_test(config)# show running-config |
| 205 | ... !(foo|bar|zoo) |
| 206 | |
Vadim Yanitskiy | 52a5c11 | 2021-11-09 13:59:20 +0300 | [diff] [blame] | 207 | stats_vty_test(config)# no stats reporter statsd statsd-foo |
| 208 | % There is no such statsd reporter with name 'statsd-foo' |
| 209 | stats_vty_test(config)# no stats reporter log log-zoo |
| 210 | % There is no such log reporter with name 'log-zoo' |
| 211 | |
Vadim Yanitskiy | bfc8377 | 2021-11-08 23:14:29 +0300 | [diff] [blame] | 212 | |
Vadim Yanitskiy | ac3a3fc | 2021-11-09 03:35:44 +0300 | [diff] [blame] | 213 | stats_vty_test(config)# stats interval 1337 |
| 214 | stats_vty_test(config)# show running-config |
| 215 | ... |
| 216 | stats interval 1337 |
| 217 | ... |