reaction/config/reaction.test.yml

26 lines
788 B
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]+'
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:
tailDown1:
cmd: [ "sh", "-c", "echo 1 2 3 4 5 1 2 3 4 5 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 | tr ' ' '\n' | while read i; do sleep 2; echo found $(($i % 10)); done" ]
2023-04-11 13:01:02 +02:00
filters:
findIP:
regex:
2023-09-06 02:00:33 +02:00
- '^found <num>$'
retry: 3
retry-period: 30s
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: 30s
2023-09-06 02:05:51 +02:00
onexit: true