elastic / logstash

Logstash - transport and process your logs, events, or other data
https://www.elastic.co/products/logstash
Other
14.1k stars 3.48k forks source link

log Iso 8583 parsing #8621

Open nhutbm opened 6 years ago

nhutbm commented 6 years ago

i have log ISO 8583 of ATM transaction as below

2017-11-09 10:03:47,291 [Thread-40] INFO com.temenos.atmlog.LogListener - Response ISO Fields (1)(0110)(2)(9704195050409216)(3)(010000)(4)(000300000000)(7)(1109030001)(11)(351176)(12)(100342)(13)(1109)(15)(1109)(18)(6011)(22)(9010)(28)(000300000)(32)(970403)(37)(100342351176)(38)(081492)(39)(00)(41)(00001116)(42)(000000099999999)(43)(CN THANH BINH DONG THAP 704)(49)(704)(54)(0001704C002212686100)(102)(1000014957411704)

in the log we can see that (1) is "field no" and the next (0110) is value of "field no" i want to filter and parsing it with gork , please help me how to do thanks so much

nhutbm commented 6 years ago

with first part

2017-11-09 10:03:47,291 [Thread-40] INFO com.temenos.atmlog.LogListener - Response ISO Fields

i can parse

%{DATESTAMP},%{NUMBER:MINISECOND} %{DATA:thread}%{LOGLEVEL}%{GREEDYDATA:INFO1}-%{GREEDYDATA:INFO2}

but the remain part i can't

(1)(0110)(2)(9704195050409216)(3)(010000)(4)(000300000000)(7)(1109030001)(11)(351176)(12)(100342)(13)(1109)(15)(1109)(18)(6011)(22)(9010)(28)(000300000)(32)(970403)(37)(100342351176)(38)(081492)(39)(00)(41)(00001116)(42)(000000099999999)(43)(CN THANH BINH DONG THAP 704)(49)(704)(54)(0001704C002212686100)(102)(1000014957411704)