# Jmeter parsing by date (ELK)

**URL:** <https://discuss.elastic.co/t/jmeter-parsing-by-date-elk/41491>\
**Category:** Logstash\
**Created:** [February 11, 2016, 1:34pm UTC](https://discuss.elastic.co/t/jmeter-parsing-by-date-elk/41491 "2016-02-11T13:34:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qassim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/qassim/32/7713_2.png) [@Qassim](https://discuss.elastic.co/u/Qassim)\
**Post date:** [February 11, 2016, 1:34pm UTC](https://discuss.elastic.co/t/jmeter-parsing-by-date-elk/41491/1 "2016-02-11T13:34:56Z")

</div>

Hi All,

I have been struggling with getting Jmeter logs (csv) into an ELK stack and parsing them by the timestamp in the provided file. I can get the logs in fine, but they're indexed by the time logstash has processed and pushed them to elastic, not by the time in my data set.

This is a sample of the data:

 ![](https://us1.discourse-cdn.com/elastic/original/2X/0/06cd1fbfb5a25b340188fd8caef07a5036c3b17a.JPG)

```
input {
        file {
                path => "/home/qassim/results.csv"
                start_position => "beginning"
            }
}
filter {
  csv {
      columns => ["@timestamp", "elapsed", "label", "responseCode", "threadName",
                    "success", "bytes", "grpThreads", "allThreads", "Latency",
                    "SampleCount", "ErrorCount", "Hostname"]
      separator => ","
     }
  date {
        locale => "en"
        match => ["@timestamp", "yyyy-MM-dd'T'HH:mm:ss.SSS"]
        timezone => "Europe/London"
      }

}
output {
    elasticsearch {
        action => "index"
        hosts => "localhost:9200"
        index => "logstash-jmeter-results-%{+YYYY.MM.dd}"
        workers => 1
    }
    stdout {}
}

```

I've tried using a mapping template for elasticsearch, with no luck. Mapping template:

```
{
    "template": "logstash-jmeter-results-*",
    "settings": {
        "number_of_shards": 1,
        "number_of_replicas": 0,
        "index.refresh_interval": "5s"
    },
    "mappings": {
        "logs": {
            "properties": {
                "@timestamp": {
                    "type": "date",
                    "format": "yyyy-MM-dd'T'HH:mm:ss.SSS"
                },
                "elapsed": {
                    "type": "long"
                },
                "label": {
                    "type": "string"
                },
                "responseCode": {
                    "type": "integer"
                },
                "threadName": {
                    "type": "string"
                },
                "success": {
                    "type": "boolean"
                },
                "bytes": {
                    "type": "long"
                },
                "grpThreads": {
                    "type": "long"
                },
                "allThreads": {
                    "type": "long"
                },
                "Latency": {
                    "type": "long"
                },
                "SampleCount": {
                    "type": "long"
                },
                "ErrorCount": {
                    "type": "long"
                },
                "Hostname": {
                    "type": "string"
                }
            }

```

I'm probably missing something stupid, but could anyone shed any light on where i'm perhaps going wrong?

Thanks,  
Qassim

---

<div class="post-metadata">

**Author:** ![Qassim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/qassim/32/7713_2.png) [@Qassim](https://discuss.elastic.co/u/Qassim)\
**Post date:** [February 11, 2016, 8:32pm UTC](https://discuss.elastic.co/t/jmeter-parsing-by-date-elk/41491/2 "2016-02-11T20:32:17Z")

</div>

Unrelated error, the config above was not what I was going for - returned back to my original (and what I had assumed to be correct config at the time) and it worked as I expected it to. My issues were caused by something outside of the ELK stack - my own fault 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 5:11am UTC](https://discuss.elastic.co/t/jmeter-parsing-by-date-elk/41491/3 "2017-07-06T05:11:55Z")

</div>


