Member since
06-12-2017
2
Posts
0
Kudos Received
0
Solutions
06-13-2017
05:11 AM
Hi @Matt Burgess I am facing a similar problem. Your help would be highly appreciated as my work is on a hold due to this issue. My data(a sample syslog) looks like below. Mar 29 2004 09:55:03: %PIX-6-302006: Teardown UDP connection for faddr 194.224.52.6/3645b4
Mar 29 2004 09:55:03: %PIX-6-302006: Teardown UDP connection for faddr 194.224.52.4/4454889 Mar 29 2004 09:54:26: %PIX-4-106023: Deny icmp src outside:Some-Cisco dst inside:10.0.0.187 I want the output to be divided into three fields: Field1: Mar 29 2004 09:55:03 (This is of fixed length) Field2: PIX-6-302006 (This is of fixed length)
Field3: Teardown UDP connection for faddr 194.224.52.6/3645b4 (The remaining data and is of variable length ) I need a regular expression(for ExtractText processor) which sub string a line based on length ,start position and end position (i.e Simialr to Java SubString method.). The reason I am asking for a index and length based substring is because my syslog may vary for each machine.But still I can use the a similar regular expression to bring out extracted fields. I am using ListFile->SplitLine->SplitText->PutFile as my processor flow. Please suggest for a better flow of processor list. Once again, thanking you for the upcoming help. Sravanthi
... View more
06-12-2017
09:35 PM
My data looks like as below Mar 29 2004 09:55:03: %PIX-6-302006: Teardown UDP connection for faddr 194.224.52.6/3645b4
Mar 29 2004 09:55:03: %PIX-6-302006: Teardown UDP connection for faddr 194.224.52.4/4454889
Mar 29 2004 09:55:03: %PIX-6-302006: Teardown UDP connection for faddr 80.58.34.99/32772666677
Mar 29 2004 09:55:03: %PIX-6-302006: Teardown UDP connection for faddr 80.132.253.64/147899999999456456
Mar 29 2004 09:55:03: %PIX-6-302006: Teardown UDP connection for faddr 80.58.4.34/370747574848 I want the output to be divided into three fields: Field1: Mar 29 2004 09:55:03 (This is of fixed length) Field2: PIX-6-302006 (This is of fixed length) Field3: Teardown UDP connection for faddr 194.224.52.6/3645b4 (The remaining data ) I need a regex expression (to be used in ExtractText Processor)which is similar to Java Substring method for(start index position,end index position). I need my attributes to be part of Nifi FlowFile attributes as to route them to different kafka output based on their value. Hope I am clear in my question.ANy help would be highly appreciated. P.S:The log file may vary in future.But I require that substring method of regex. ,
... View more
Labels:
- Labels:
-
Apache NiFi