799ba88823
fixes #25 thanks @bertille-ddp for comments && suggestions!
23 lines
501 B
YAML
23 lines
501 B
YAML
---
|
|
patterns:
|
|
ip:
|
|
regex: '(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})|(?:[0-9a-fA-F:]{2,90})'
|
|
ignore:
|
|
- 1.0.0.1
|
|
|
|
streams:
|
|
tailDown:
|
|
cmd: [ "sh", "-c", "echo 'found 1.1.1.1' && sleep 2 && echo 'found 1.0.0.1' && sleep 10m" ]
|
|
filters:
|
|
findIP:
|
|
regex:
|
|
- '^found <ip>'
|
|
retry: 2
|
|
retry-period: 1m
|
|
actions:
|
|
damn:
|
|
cmd: [ "echo", "<ip>" ]
|
|
undamn:
|
|
cmd: [ "echo", "undamn", "<ip>" ]
|
|
after: 1m
|