reaction/config/reaction.test.yml

71 lines
1.7 KiB
YAML
Raw Normal View History

2023-04-11 13:01:02 +02:00
---
patterns:
2023-09-06 02:00:33 +02:00
num:
regex: '[0-9]+'
2023-08-21 23:33:56 +02:00
ip:
regex: '(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:[0-9a-fA-F:]{2,90})'
ignore:
- 1.0.0.1
2023-04-11 13:01:02 +02:00
streams:
2023-09-06 02:00:33 +02:00
tailDown1:
cmd: [ "sh", "-c", "sleep 2; seq 100010 | while read i; do echo found $(($i % 100)); done" ]
2023-04-11 13:01:02 +02:00
filters:
findIP:
regex:
2023-09-06 02:00:33 +02:00
- '^found <num>$'
retry: 10
2023-04-27 10:42:19 +02:00
retry-period: 1m
2023-04-11 13:01:02 +02:00
actions:
damn:
2023-09-06 02:00:33 +02:00
cmd: [ "echo", "<num>" ]
undamn:
2023-09-06 02:00:33 +02:00
cmd: [ "echo", "undamn", "<num>" ]
after: 1m
2023-09-06 02:00:33 +02:00
onexit: false
tailDown2:
cmd: [ "sh", "-c", "sleep 2; seq 100010 | while read i; do echo prout $(($i % 100)); done" ]
filters:
findIP:
regex:
- '^prout <num>$'
retry: 10
retry-period: 1m
actions:
damn:
cmd: [ "echo", "<num>" ]
undamn:
cmd: [ "echo", "undamn", "<num>" ]
after: 1m
onexit: false
tailDown3:
cmd: [ "sh", "-c", "sleep 2; seq 100010 | while read i; do echo nanana $(($i % 100)); done" ]
filters:
findIP:
regex:
- '^nanana <num>$'
retry: 4
retry-period: 2m
actions:
damn:
cmd: [ "true" ]
undamn:
cmd: [ "true" ]
after: 1m
onexit: false
tailDown4:
cmd: [ "sh", "-c", "sleep 2; seq 100010 | while read i; do echo nanana $(($i % 100)); done" ]
filters:
findIP:
regex:
- '^nomatch <num>$'
retry: 5
retry-period: 2m
actions:
damn:
cmd: [ "echo", "<num>" ]
undamn:
cmd: [ "echo", "undamn", "<num>" ]
after: 1m
onexit: false