I'm a Logstash newbie and I've looked at numerous examples of grok patterns and I'm still struggling to acheive my goal which is to parse the following JSON formatted log event.
{
"@fields": {
"level": "DEBUG",
"mdc": {},
"file": "SearchServiceImpl.java",
"class": "com.blah.blah.service.impl.SearchServiceImpl",
"line_number": "767",
"method": "getUserSavedSearches"
},
"@timestamp": "2015-04-24T12:30:37.953+01:00",
"@message": "username: admin sessionid: 56cR73aBpuIBzRgIElzLUtJJ method_name: getUserSavedSearches",
"@source_host": "Kens-MacBook.local"
}
In particular I'd like to extract the session id and username. I'm also hoping I can be pointed to detailed documentation explaining how to use Grok. (I've read the available docs on logstash etc). Any help will be appreciated