[ 
https://issues.apache.org/jira/browse/CAMEL-10540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16127856#comment-16127856
 ] 

Mike Barlotta commented on CAMEL-10540:
---------------------------------------

Not sure if anyone has taken a crack at this component, but would be willing to 
look into it.

But wanted to also clarify some things
* assume that this would be a new component under the camel/components in github
* solution should seek to leverage elastic search grok capabilities 

At initial glance seems this is a candidate for the pluggable Camel Data 
Formats. 

{code:java}
from(direct:in)
  .marshal()
  .grok("%{IP:client} %{WORD:method} %{URIPATHPARAM:request} %{NUMBER:bytes}")
  .to(mock:result);
{code}

Is that what is intended?

I assume (similar to the Grok filter plugin on Elastic Search) that the 
contents of Exchange.getIn().getBody() would be evaluated such that 

{noformat}
55.3.244.1 GET /index.html 15824 0.043
{noformat}

passing through the Grok Filter
{noformat}
%{IP:client} %{WORD:method} %{URIPATHPARAM:request} %{NUMBER:bytes} 
{noformat}

would yield a Map in the Exchange body as follows

||Key||Value||
|client|55.3.244.1|
|method|GET|
|request|/index/html|
|bytes|15824|

Just let me know

> GROK Parser
> -----------
>
>                 Key: CAMEL-10540
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10540
>             Project: Camel
>          Issue Type: New Feature
>            Reporter: Jan Bernhardt
>
> As discussed on the mailing list [1], it would be great to have a grok filter 
> for camel, to parse text with multiple named regex expressions resulting in a 
> Map containing the named key as well as the parsed value.
> [1] 
> http://camel.465427.n5.nabble.com/Parsing-unstructured-Text-in-Camel-td5790513.html



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to