2021-03-17 14:29:55 +00:00
|
|
|
Start test: test_reporting
|
|
|
|
DLGLOBAL ERROR counter group 'ctr-test:one' already exists for index 2, instead using index 3. This is a software bug that needs fixing.
|
|
|
|
DLGLOBAL ERROR 'ctr-test.one_dot' is not a valid counter group identifier
|
|
|
|
DLGLOBAL NOTICE counter group name mangled: 'ctr-test.one_dot' -> 'ctr-test:one_dot'
|
|
|
|
DLGLOBAL NOTICE counter group name mangled: 'ctr.a' -> 'ctr:a'
|
|
|
|
DLGLOBAL NOTICE counter group name mangled: 'ctr.b' -> 'ctr:b'
|
|
|
|
test1: open
|
|
|
|
test2: open
|
|
|
|
report (initial):
|
|
|
|
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
2021-09-14 15:41:25 +00:00
|
|
|
reported: 12 counter vals, 8 stat item vals
|
2021-03-17 14:29:55 +00:00
|
|
|
report (srep1 global):
|
|
|
|
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
|
|
|
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
|
|
|
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
|
|
|
test2: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
|
|
|
test2: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
2021-09-14 15:41:25 +00:00
|
|
|
reported: 6 counter vals, 4 stat item vals
|
2021-03-17 14:29:55 +00:00
|
|
|
report (srep1 peer):
|
|
|
|
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
|
|
|
test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
2021-09-14 15:41:25 +00:00
|
|
|
reported: 6 counter vals, 8 stat item vals
|
2021-03-17 14:29:55 +00:00
|
|
|
report (srep1 subscriber):
|
|
|
|
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
2021-09-14 15:41:25 +00:00
|
|
|
reported: 12 counter vals, 8 stat item vals
|
2021-03-17 14:29:55 +00:00
|
|
|
report (srep2 disabled):
|
|
|
|
test2: close
|
|
|
|
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
|
|
|
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
|
|
|
test1: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
|
|
|
test1: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
|
|
|
test1: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
|
|
|
test1: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
|
|
|
test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
|
|
|
test1: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
|
|
|
test1: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
|
|
|
test1: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
2021-09-14 15:41:25 +00:00
|
|
|
reported: 6 counter vals, 4 stat item vals
|
2021-03-17 14:29:55 +00:00
|
|
|
report (srep2 enabled, no flush forced):
|
|
|
|
test2: open
|
|
|
|
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one i=1 n=ctr:a v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one i=1 n=ctr:b v=0 d=0
|
|
|
|
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
|
|
|
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
|
|
|
test2: item p= g=test.one i=1 n=item.a v=-1 u=ma
|
|
|
|
test2: item p= g=test.one i=1 n=item.b v=-1 u=kb
|
2021-09-14 15:41:25 +00:00
|
|
|
reported: 6 counter vals, 4 stat item vals
|
2021-03-17 14:29:55 +00:00
|
|
|
report (should be empty):
|
2021-09-14 15:41:25 +00:00
|
|
|
reported: 0 counter vals, 0 stat item vals
|
2021-03-17 14:29:55 +00:00
|
|
|
report (group 1, counter 1 update):
|
|
|
|
test1: counter p= g=ctr-test:one i=1 n=ctr:a v=1 d=1
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: counter p= g=ctr-test:one i=1 n=ctr:a v=1 d=1
|
2021-09-14 15:41:25 +00:00
|
|
|
reported: 2 counter vals, 0 stat item vals
|
2021-03-17 14:29:55 +00:00
|
|
|
report (group 1, item 1 update):
|
|
|
|
test1: item p= g=test.one i=1 n=item.a v=10 u=ma
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: item p= g=test.one i=1 n=item.a v=10 u=ma
|
2021-09-14 15:41:25 +00:00
|
|
|
reported: 0 counter vals, 2 stat item vals
|
2021-09-14 19:49:00 +00:00
|
|
|
report (group 1, item 1 update twice, with same value):
|
|
|
|
reported: 0 counter vals, 0 stat item vals
|
2021-03-17 14:29:55 +00:00
|
|
|
report (group 1, item 1 update twice, check max):
|
|
|
|
test1: item p= g=test.one i=1 n=item.a v=20 u=ma
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: item p= g=test.one i=1 n=item.a v=20 u=ma
|
2021-09-14 15:41:25 +00:00
|
|
|
reported: 0 counter vals, 2 stat item vals
|
2021-08-19 08:07:44 +00:00
|
|
|
report (group 1, item 1 no update, send last item (!= last max), OS#5215):
|
stats: send real last value if no new values come
Background:
* Individual values can be added to osmo_stat_item.values at any time.
* Stats are reported at a fixed interval (see vty 'stats interval'),
e.g. every 10 seconds.
* In order to report a new stat value, we use the maximum of all
osmo_stat_item.values added since the last report.
* By default, we do not send new stat values if they did not change
(see vty 'config-stats' -> 'flush-period' default of 0).
Fix the following bug:
* If 'flush-period' is 0, and no new osmo_stat_item.values are coming
in, the last value that gets reported is not necessarily the last
entry in osmo_stat_item.values.
* For attached reporters (statsd), it could then be that the given stat
stays at the wrong value for a long stretch of time (think of several
hours/days/forever).
Explanation of how the test shows that it is fixed:
* stats get reported (value is irrelevant)
* osmo_stat_item gets a new value: 20
* osmo_stat_item gets a new value: 10
* stats get reported (value: 20, the maximum of both new values)
* osmo_stat_item gets no new values
* stats get reported (value: 10, this is new because of the bug fix,
the real last value in osmo_stat_item, different from the 20 sent
earlier, without the fix it would not send anything here and the last
sent value would be 20)
* osmo_stat_item gets no new values
* stats get reported (nothing gets sent, since the real last value was
already sent and 'flush-period' is 0)
Fixes: OS#5215
Change-Id: Ibeefd0e3d1dbe4be454ff05a21df4848b2abfabe
2021-08-19 09:58:09 +00:00
|
|
|
test1: item p= g=test.one i=1 n=item.a v=10 u=ma
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: item p= g=test.one i=1 n=item.a v=10 u=ma
|
2021-09-14 15:41:25 +00:00
|
|
|
reported: 0 counter vals, 2 stat item vals
|
2021-08-19 08:07:44 +00:00
|
|
|
report (group 1, item 1 no update, nothing to send):
|
2021-09-14 15:41:25 +00:00
|
|
|
reported: 0 counter vals, 0 stat item vals
|
2021-03-17 14:29:55 +00:00
|
|
|
report (remove statg1, ctrg1):
|
|
|
|
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
2021-03-17 14:29:55 +00:00
|
|
|
test1: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
2021-11-09 00:58:35 +00:00
|
|
|
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
2021-09-14 15:41:25 +00:00
|
|
|
reported: 8 counter vals, 4 stat item vals
|
2021-03-17 14:29:55 +00:00
|
|
|
report (remove srep1):
|
|
|
|
test1: close
|
|
|
|
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
|
|
|
test2: item p= g=test.one i=2 n=item.a v=-1 u=ma
|
|
|
|
test2: item p= g=test.one i=2 n=item.b v=-1 u=kb
|
2021-09-14 15:41:25 +00:00
|
|
|
reported: 4 counter vals, 2 stat item vals
|
2021-03-17 14:29:55 +00:00
|
|
|
report (remove statg2):
|
|
|
|
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:a v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one_dot i=3 n=ctr:b v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one i=2 n=ctr:a v=0 d=0
|
|
|
|
test2: counter p= g=ctr-test:one i=2 n=ctr:b v=0 d=0
|
2021-09-14 15:41:25 +00:00
|
|
|
reported: 4 counter vals, 0 stat item vals
|
2021-03-17 14:29:55 +00:00
|
|
|
report (remove srep2):
|
|
|
|
test2: close
|
2021-09-14 15:41:25 +00:00
|
|
|
reported: 0 counter vals, 0 stat item vals
|
2021-03-17 14:29:55 +00:00
|
|
|
report (remove ctrg2, should be empty):
|
2021-09-14 15:41:25 +00:00
|
|
|
reported: 0 counter vals, 0 stat item vals
|
2021-03-17 14:29:55 +00:00
|
|
|
End test: test_reporting
|