reaction/config/heavy-load_write_to_redis.yml

63 lines
1.7 KiB
YAML
Raw Permalink Normal View History

2024-03-30 17:28:20 +01:00
---
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
outputs:
redis:
start: ['redis-cli', '-h', 'redis.example.org', '-a', 'mypasswordoncmdlinedontdothis']
streams:
tailDown1:
cmd: [ 'sh', '-c', 'seq 100010 | while read i; do echo found $(($i % 100)) for test 1; done' ]
filters:
findIP:
regex:
- '^found <num> for test <idx>$'
actions:
store2redis:
write:
output: redis
text: ['XADD', 'teststream', '*', 'found', '<num>', 'test', '<idx>']
tailDown2:
cmd: [ 'sh', '-c', 'seq 100010 | while read i; do echo prout $(($i % 100)) for test 2; done' ]
filters:
findIP:
regex:
- '^prout <num> for test <idx>$'
actions:
store2redis:
write:
output: redis
text: ['XADD', 'teststream', '*', 'prout', '<num>', 'test', '<idx>']
tailDown3:
cmd: [ 'sh', '-c', 'seq 100010 | while read i; do echo nanana $(($i % 100)) for test 3; done' ]
filters:
findIP:
regex:
- '^nanana <num> for test <idx>$'
actions:
store2redis:
write:
output: redis
text: ['XADD', 'teststream', '*', 'nanana', '<num>', 'test', '<idx>']
tailDown4:
cmd: [ 'sh', '-c', 'seq 100010 | while read i; do echo nanana $(($i % 100)) for test 4; done' ]
filters:
findIP:
regex:
- '^nomatch <num> for test <idx>$'
actions:
store2redis:
write:
output: redis
text: ['XADD', 'teststream', '*', 'nomatch', '<num>', 'test', '<idx>']