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

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -