elasticsearch - Querying Kibana using grok pattern -
we have configured elk stack on our daily logs , using kibana
ui perform basic search/query operation on the set of logs.
some of our logs have field in message while others don't. therefore have not configured separate field while configuring logstash
.
i have logs like:
[28/jun/2016:23:59:56 +0530] 192.168.xxx.xxx [api:profile]get_data_login: project password success: 9xxxxxxxxx0 [28/jun/2016:23:59:56 +0530] 192.168.xxx.xxx [api:profile]session_end: logout success: 9xxxxxxxxx0 totaltime:1.1234
in these 2 logs, wish extract totaltime
session_end
logs. , visualize it.
how should it?
i can search logs listed under session_end
, not able perform grok on set of logs.
inside filter in logstash can have :
filter { ... if ([message] ~= "session_end") { grok { #write grok second format of log here } } else if ([message] ~= "get_data_login") { grok { #write grok first format of log here } } ... }
grok patterns cannot used querying in kibana.
Comments
Post a Comment