hi there,
I am stuck with a specific issue related to clickstream log. It's based on the selection made by the user.If a user selects something then the request gets added up in the request parameter. I am posting a sample log over here so that you can better understand the problem
I would suggest something like example 3 in the aggregate documentation, but keep overwriting the map entry with the most recent value of the request body.
hi there,
Here I have created one list 'request_body'.
map['request_body'] << {'request' => event.get('request')}
Can u tell me that how should I access the last element of that list. I just want the syntax
I tried that, but now it is giving output for every request. Basically my aggregation is not working .I wanted it first to be aggregated based on user id and stored in one list('request_body') by using this-> map['request_body'] << {'request' => event.get('request')}
Then I wanted to select the last element from that list.
I am getting my request_body as
For 1st log
request_body{
"A=X"
}
For 2nd log
request_body{
"A"="X",
"B"="Y",
}
but I want the last request_body only.
plz help
You have not shown us what an event looks like, so we cannot say what is wrong with the aggregate filter. Either show us the filter {} section, or show us an event with output { stdout { codec => rubydebug } }
Check the request_body part, for one log I am getting
request_body{
"A"="X"
}
for another log I am getting
request_body{
"A"="X",
"B"="Y",
}
So, basically I want the final one(2nd one),as it contains the element of the previous log also.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.