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