so I am trying to set an IF statement that says if [syslog5424_pri] == '164' then do this.... but I am not able to get this working? I added an add_tag test statement to verify whether it went through which it does.... here's the code.... guess my If statement needs work?
Can you please give me your whole logstash config chain? It's hard for me to work with a few filters, being able to see the whole thing would be great:
In addition to this, please supply an example log that you are matching.
Thanks OptimusB!
TwitsBlog Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
\/? will optionally match '/' and \d* will match 0 or more 'decimals'.
TwitsBlog Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Original Address=%{IP}\/?\|%{NUMBER:port} %{CISCOTIMESTAMP}
TwitsBlog Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
grok {
match => [ 'message', '%{IP}\/%{NUMBER}']
match => ['message', '%{IP}']
}
This way if there's a port it will match first statement and break. If it doesn't have a port on the IP, it will match the second statement.
Not sure if there's a more efficient way but this worked perfectly.
Perfect - It seems like you're getting the hang of this.
Do you have any further questions that I could help you with?
TwitsBlog Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
I am ok for now. Thanks again for the assistance. This had really helped us build the dashboards and get better visualization.
Thread can be locked. Cheers.
TwitsBlog Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.