2023-10-04 12:00:00 +02:00
|
|
|
{
|
|
|
|
patterns: {
|
|
|
|
num: {
|
|
|
|
regex: '[0-9]+',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2023-10-22 12:00:00 +02:00
|
|
|
start: [
|
|
|
|
['err'],
|
2023-11-23 12:00:00 +01:00
|
|
|
['sleep', '1'],
|
2023-10-22 12:00:00 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
stop: [
|
|
|
|
['sleep', '1'],
|
2023-11-23 12:00:00 +01:00
|
|
|
// ['false'],
|
2023-10-22 12:00:00 +02:00
|
|
|
['true'],
|
|
|
|
],
|
|
|
|
|
2023-10-04 12:00:00 +02:00
|
|
|
streams: {
|
|
|
|
tailDown1: {
|
2024-01-05 12:00:00 +01:00
|
|
|
cmd: ['sh', '-c', "echo 1 2 3 4 5 5 | tr ' ' '\n' | while read i; do sleep 1; echo found $(($i % 10)); done"],
|
2023-11-23 12:00:00 +01:00
|
|
|
// 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-10-21 12:00:00 +02:00
|
|
|
filters: {
|
|
|
|
findIP: {
|
2024-01-04 12:00:00 +01:00
|
|
|
regex: ['^found <num>$'],
|
2024-01-05 12:00:00 +01:00
|
|
|
retry: 1,
|
2023-10-21 12:00:00 +02:00
|
|
|
retryperiod: '30s',
|
|
|
|
actions: {
|
|
|
|
damn: {
|
|
|
|
cmd: ['echo', '<num>'],
|
|
|
|
},
|
|
|
|
undamn: {
|
|
|
|
cmd: ['echo', 'undamn', '<num>'],
|
2024-01-05 12:00:00 +01:00
|
|
|
after: '4s',
|
2023-10-21 12:00:00 +02:00
|
|
|
onexit: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2023-11-23 12:00:00 +01:00
|
|
|
// tailDown2: {
|
|
|
|
// cmd: ['sh', '-c', 'echo coucou; sleep 2m'],
|
|
|
|
// filters: {
|
|
|
|
// findIP: {
|
|
|
|
// regex: ['^found <num>$'],
|
|
|
|
// retry: 3,
|
|
|
|
// retryperiod: '30s',
|
|
|
|
// actions: {
|
|
|
|
// damn: {
|
|
|
|
// cmd: ['echo', '<num>'],
|
|
|
|
// },
|
|
|
|
// undamn: {
|
|
|
|
// cmd: ['echo', 'undamn', '<num>'],
|
|
|
|
// after: '30s',
|
|
|
|
// onexit: true,
|
|
|
|
// },
|
|
|
|
// },
|
|
|
|
// },
|
|
|
|
// },
|
|
|
|
// },
|
2023-10-04 12:00:00 +02:00
|
|
|
},
|
|
|
|
}
|