Purna Satya
Purna Satya

Reputation: 173

ElasticSearch Kibana dashboard analysis for JMeter logs

I have a log file from JMeter which has following columns.

timeStamp ,elapsed ,label, responseCode, responseMessage,threadName,dataType,success,failureMessage,bytes,grpThreads,allThreads,Latency,SampleCount,ErrorCount,Hostname

I have been able to generate a graph on Kibana which gives me the elapsed time.

But I have not been able to search for Latency.

Is there any place in the histogram settings where I can select that I want to plot a graph between Timestamp and Latency or Timestamp and ErrorCount?

Also, my Time stamp in JMeter is defined as "jmeter.save.saveservice.timestamp_format=yyyy-MM-dd'T'HH:mm:ss.SSSZ"

but I am getting an error in ElasticSearch as

[2014-11-05 16:22:54,816][DEBUG][action.search.type       ] [Contrary] [shakespeare][2], node[S7Xyo1rSRGq6gzC9HtsCsg], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@453beee2] lastShard [true]
org.elasticsearch.search.SearchParseException: [shakespeare][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"facets":{"0":{"date_histogram":{"field":"@timestamp","interval":"1s"},"global":true,"facet_filter":{"fquery":{"query":{"filtered":{"query":{"query_string":{"query":"*"}},"filter":{"bool":{"must":[{"range":{"@timestamp":{"from":1415141574791,"to":1415184774791}}}]}}}}}}}},"size":20,"query":{"filtered":{"query":{"query_string":{"query":"Latency"}},"filter":{"bool":{"must":[{"range":{"@timestamp":{"from":1415141574791,"to":1415184774791}}}]}}}},"sort":[{"_score":{"order":"desc","ignore_unmapped":true}},{"@timestamp":{"order":"desc","ignore_unmapped":true}}]}]]

Is there any way I can solve this error?

Thanks,

Upvotes: 1

Views: 3263

Answers (1)

pesetskyps
pesetskyps

Reputation: 48

Will not answer your question directly, but will provide our way of importing jmeter results to logstash

JmeterLog example: timeStamp,elapsed,label,responseCode,responseMessage,threadName,bytes,grpThreads,allThreads,URL,Latency 2014-11-05 09:43:56,13742,1 Load Tweet Feed Content,200,OK,Thread Group 1-964,4557,33,33,http://activity.flux.com/api/ActivityService/FindActivities2?cmId=12C6FFFF01DCE0D90002FFFFC612&cnId=12C6FFFF01DCE0D9001B01F459C3&dSCF=true&aFF=Twitter&mR=20&iT=true&iR=true&pAT=CommentContent&_t=1392986211131&skipCache=true&callback=FCA8AD20E&product=load_testing&productLocation=load_testing,13742

Logstash parsing filter

  #Load Test data
  if [LogSeverityType] == "LoadTest" {
    if [Message] =~ "^time" {drop {}}
    grok{
    match => ["Message","%{TIMESTAMP_ISO8601:log_timestamp},%{NUMBER:elapsed},%{DATA:label},%{NUMBER:responseCode},%{DATA:responseMessage},%{DATA:threadName},%{NUMBER:bytes},%{NUMBER:grpThreads},%{NUMBER:allThreads},%{DATA:URL},%{NUMBER:Latency}"]
    }
    mutate {
      convert => [ "Latency", "integer" ]
      convert => [ "elapsed", "integer" ]
      convert => [ "grpThreads", "integer" ]
      convert => [ "allThreads", "integer" ]
      convert => [ "responseCode", "integer" ]
      convert => [ "bytes", "integer" ]
    }
    date {
      match => [ "log_timestamp", "YYYY-MM-dd HH:mm:ss", "ISO8601" ]
      timezone => "Etc/UCT"
    }
  }

Upvotes: 3

Related Questions