Closed tengattack closed 6 years ago
Hi, I think this could help us to do more complex consumption for events.
Add filter/cond and output/cond implements the sequence control for event's filters and outputs.
filter/cond
output/cond
a simple config:
input: - type: httplisten address: '0.0.0.0:8081' path: '/log' filter: - type: add_field key: instance_id value: '123456' - type: cond condition: "([nginx.access.url] ?? '') =~ '^/api/'" filter: - type: add_field key: controller value: api output: - type: cond condition: "info == 'ERROR'" output: - type: stdout
thx for the PR
Could you help me to fix that? BYW, we can update the entry README too. :)
oh, ... modified many times, finally find a solution:
condition: "([nginx.access.url] ?? '') =~ '^/api/'"
Hi, I think this could help us to do more complex consumption for events.
Add
filter/cond
andoutput/cond
implements the sequence control for event's filters and outputs.a simple config: