51 lines
1.8 KiB
YAML
51 lines
1.8 KiB
YAML
---
|
|
patterns:
|
|
num:
|
|
regex: '[0-9]+'
|
|
idx:
|
|
regex: '[0-9]+'
|
|
ip:
|
|
regex: '(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:[0-9a-fA-F:]{2,90})'
|
|
ignore:
|
|
- 1.0.0.1
|
|
|
|
concurrency: 0
|
|
|
|
streams:
|
|
tailDown1:
|
|
cmd: [ 'sh', '-c', 'sleep 2; seq 100010 | while read i; do echo found $(($i % 100)) for test 1; done' ]
|
|
filters:
|
|
findIP:
|
|
regex:
|
|
- '^found <num> for test <idx>$'
|
|
actions:
|
|
store2redis:
|
|
cmd: ['redis-cli', '-h', 'redis.example.org', '-a', 'mypasswordoncmdlinedontdothis', 'XADD', 'teststream', '*', 'found', '<num>', 'test', '<idx>']
|
|
tailDown2:
|
|
cmd: [ 'sh', '-c', 'sleep 2; seq 100010 | while read i; do echo prout $(($i % 100)) for test 2; done' ]
|
|
filters:
|
|
findIP:
|
|
regex:
|
|
- '^prout <num> for test <idx>$'
|
|
actions:
|
|
store2redis:
|
|
cmd: ['redis-cli', '-h', 'redis.example.org', '-a', 'mypasswordoncmdlinedontdothis', 'XADD', 'teststream', '*', 'found', '<num>', 'test', '<idx>']
|
|
tailDown3:
|
|
cmd: [ 'sh', '-c', 'sleep 2; seq 100010 | while read i; do echo nanana $(($i % 100)) for test 3; done' ]
|
|
filters:
|
|
findIP:
|
|
regex:
|
|
- '^nanana <num> for test <idx>$'
|
|
actions:
|
|
store2redis:
|
|
cmd: ['redis-cli', '-h', 'redis.example.org', '-a', 'mypasswordoncmdlinedontdothis', 'XADD', 'teststream', '*', 'found', '<num>', 'test', '<idx>']
|
|
tailDown4:
|
|
cmd: [ 'sh', '-c', 'sleep 2; seq 100010 | while read i; do echo nanana $(($i % 100)) for test 4; done' ]
|
|
filters:
|
|
findIP:
|
|
regex:
|
|
- '^nomatch <num> for test <idx>$'
|
|
actions:
|
|
store2redis:
|
|
cmd: ['redis-cli', '-h', 'redis.example.org', '-a', 'mypasswordoncmdlinedontdothis', 'XADD', 'teststream', '*', 'found', '<num>', 'test', '<idx>']
|