Jump out of filter to output

(Jaxon Kochel) #1

Is there any way to jump out of the filter straight to output? I'm having an issue with log files with very similar names being picked up by multiple path =~, and its breaking my logging. is there anyway to jump out of the filter and go straight to the output.

i have a files that's called "ebi.server.error.(logsdate)" and some that are just "server.(logsdate)". An ebi.server.error log fits both path =~ "ebi.server.error" and then continues down the filter section and also hits path =~"server." is there anything i can add in the "ebi.server.error" section to jump out of the filter block and go straight to the output block?

Thank you soooo much in advance.

(Paris Mermigkas) #2

Don't know if I understood correctly, but you could use an if/else statement to do that (going from specific to generic).


if [path] =~  "ebi.server.error" {
     ## do stuff
else if [path] =~  "server" {
     ## do stuff

Logs would go through the first matching statement and skip the rest.

(Jaxon Kochel) #3

oh my gosh I feel so embarrassed, like duh. thank you!

(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.