mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-17 01:00:40 +01:00
ensured dynstats overflow tests actually excercise 1 non-metric-name-resetting cycle too
This commit is contained in:
parent
d4d74a8188
commit
c4a9e693c6
@ -5,7 +5,7 @@ echo ===========================================================================
|
||||
echo \[dynstats_overflow.sh\]: test for gathering stats when metrics exceed provisioned capacity
|
||||
. $srcdir/diag.sh init
|
||||
. $srcdir/diag.sh startup-vg dynstats_overflow.conf
|
||||
. $srcdir/diag.sh injectmsg-litteral $srcdir/testsuites/dynstats_input_more_1
|
||||
. $srcdir/diag.sh injectmsg-litteral $srcdir/testsuites/dynstats_input_more_0
|
||||
. $srcdir/diag.sh wait-queueempty
|
||||
. $srcdir/diag.sh content-check "foo 001 0"
|
||||
. $srcdir/diag.sh content-check "bar 002 0"
|
||||
@ -17,10 +17,13 @@ echo \[dynstats_overflow.sh\]: test for gathering stats when metrics exceed prov
|
||||
. $srcdir/diag.sh content-check "corge 008 -6"
|
||||
. $srcdir/diag.sh content-check "quux 009 -6"
|
||||
. $srcdir/diag.sh content-check "foo 010 0"
|
||||
sleep 1
|
||||
. $srcdir/diag.sh injectmsg-litteral $srcdir/testsuites/dynstats_input_more_1
|
||||
. $srcdir/diag.sh wait-queueempty
|
||||
. $srcdir/diag.sh content-check "corge 011 -6"
|
||||
. $srcdir/diag.sh content-check "grault 012 -6"
|
||||
. $srcdir/diag.sh content-check "foo 013 0"
|
||||
sleep 2
|
||||
sleep 1 #sleep above + this = 2 seconds, so metric-names reset should have happened
|
||||
. $srcdir/diag.sh wait-queueempty
|
||||
. $srcdir/diag.sh first-column-sum-check 's/.*foo=\([0-9]\+\)/\1/g' 'foo=' 'rsyslog.out.stats.log' 5
|
||||
. $srcdir/diag.sh first-column-sum-check 's/.*bar=\([0-9]\+\)/\1/g' 'bar=' 'rsyslog.out.stats.log' 1
|
||||
|
||||
@ -5,7 +5,7 @@ echo ===========================================================================
|
||||
echo \[dynstats_overflow.sh\]: test for gathering stats when metrics exceed provisioned capacity
|
||||
. $srcdir/diag.sh init
|
||||
. $srcdir/diag.sh startup dynstats_overflow.conf
|
||||
. $srcdir/diag.sh injectmsg-litteral $srcdir/testsuites/dynstats_input_more_1
|
||||
. $srcdir/diag.sh injectmsg-litteral $srcdir/testsuites/dynstats_input_more_0
|
||||
. $srcdir/diag.sh wait-queueempty
|
||||
. $srcdir/diag.sh content-check "foo 001 0"
|
||||
. $srcdir/diag.sh content-check "bar 002 0"
|
||||
@ -17,10 +17,13 @@ echo \[dynstats_overflow.sh\]: test for gathering stats when metrics exceed prov
|
||||
. $srcdir/diag.sh content-check "corge 008 -6"
|
||||
. $srcdir/diag.sh content-check "quux 009 -6"
|
||||
. $srcdir/diag.sh content-check "foo 010 0"
|
||||
sleep 1
|
||||
. $srcdir/diag.sh injectmsg-litteral $srcdir/testsuites/dynstats_input_more_1
|
||||
. $srcdir/diag.sh wait-queueempty
|
||||
. $srcdir/diag.sh content-check "corge 011 -6"
|
||||
. $srcdir/diag.sh content-check "grault 012 -6"
|
||||
. $srcdir/diag.sh content-check "foo 013 0"
|
||||
sleep 2
|
||||
sleep 1 #sleep above + this = 2 seconds, so metric-names reset should have happened
|
||||
. $srcdir/diag.sh wait-queueempty
|
||||
. $srcdir/diag.sh first-column-sum-check 's/.*foo=\([0-9]\+\)/\1/g' 'foo=' 'rsyslog.out.stats.log' 5
|
||||
. $srcdir/diag.sh first-column-sum-check 's/.*bar=\([0-9]\+\)/\1/g' 'bar=' 'rsyslog.out.stats.log' 1
|
||||
|
||||
10
tests/testsuites/dynstats_input_more_0
Normal file
10
tests/testsuites/dynstats_input_more_0
Normal file
@ -0,0 +1,10 @@
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:foo 001
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:bar 002
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:baz 003
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:foo 004
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:baz 005
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:foo 006
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:quux 007
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:corge 008
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:quux 009
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:foo 010
|
||||
@ -1,13 +1,3 @@
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:foo 001
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:bar 002
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:baz 003
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:foo 004
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:baz 005
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:foo 006
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:quux 007
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:corge 008
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:quux 009
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:foo 010
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:corge 011
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:grault 012
|
||||
<167>Mar 6 16:57:54 172.20.245.8 %PIX-7-710005:foo 013
|
||||
|
||||
@ -4,7 +4,7 @@ ruleset(name="stats") {
|
||||
action(type="omfile" file="./rsyslog.out.stats.log")
|
||||
}
|
||||
|
||||
module(load="../plugins/impstats/.libs/impstats" interval="2" severity="7" resetCounters="on" Ruleset="stats" bracketing="on")
|
||||
module(load="../plugins/impstats/.libs/impstats" interval="1" severity="7" resetCounters="on" Ruleset="stats" bracketing="on")
|
||||
|
||||
template(name="outfmt" type="string" string="%msg% %$.increment_successful%\n")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user