reaction/config/reaction.test.yml

22 lines
429 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]+'
2023-04-11 13:01:02 +02:00
streams:
2023-09-06 02:05:51 +02:00
tailDown:
cmd: [ "sh", "-c", "sleep 2; echo found 1; echo found 2; sleep 2" ]
2023-04-11 13:01:02 +02:00
filters:
findIP:
regex:
2023-09-06 02:00:33 +02:00
- '^found <num>$'
2023-09-06 02:05:51 +02:00
retry: 2
retry-period: 2m
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:05:51 +02:00
onexit: true