# Log sequence issue in Kibana

**URL:** <https://discuss.elastic.co/t/log-sequence-issue-in-kibana/199607>\
**Category:** Kibana\
**Created:** [September 16, 2019, 8:31am UTC](https://discuss.elastic.co/t/log-sequence-issue-in-kibana/199607 "2019-09-16T08:31:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vipin\_Gaur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vipin_gaur/32/46948_2.png) [@Vipin\_Gaur](https://discuss.elastic.co/u/Vipin_Gaur)\
**Post date:** [September 16, 2019, 8:31am UTC](https://discuss.elastic.co/t/log-sequence-issue-in-kibana/199607/1 "2019-09-16T08:31:15Z")

</div>

All,

We are successfully shipping logs to ELK,Actual App Logs are generating in Kibana but with different sequence.Basically I want the log lines shown on Kibana to be in the same order as I would see them in the actual log files. ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/4/a4d06fc92621e26c5da7c6fc4695bcc20ab7c2d9.png) Screenshot 2019-09-16 at 1.11.10 PM

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [September 16, 2019, 4:59pm UTC](https://discuss.elastic.co/t/log-sequence-issue-in-kibana/199607/2 "2019-09-16T16:59:03Z")

</div>

Hey @Vipin_Gaur, it looks like the `message` field contains the actual date and time that you wish to use to order your events. If it isn't already, you'll want to extract this date and time from the `message` field into a dedicated field. After doing so, you can configure this field as the **Time Filter field name** per [https://www.elastic.co/guide/en/kibana/current/tutorial-define-index.html#\_create\_an\_index\_pattern\_for\_time\_series\_data](https://www.elastic.co/guide/en/kibana/current/tutorial-define-index.html#_create_an_index_pattern_for_time_series_data) and your documents will then be ordered this way.

---

<div class="post-metadata">

**Author:** ![Vipin\_Gaur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vipin_gaur/32/46948_2.png) [@Vipin\_Gaur](https://discuss.elastic.co/u/Vipin_Gaur)\
**Post date:** [September 17, 2019, 6:14am UTC](https://discuss.elastic.co/t/log-sequence-issue-in-kibana/199607/3 "2019-09-17T06:14:45Z")

</div>

how to extract date and time from message field into a dedicated field.  
this is my .conf file

input {  
beats {  
port =\> 5044

```
    }

```

}  
filter {  
if [log\_type] == "json" {  
mutate {  
rename =\> {  
"message" =\> "raw\_data"  
}  
}  
json {  
source =\> "raw\_data"  
}  
date {  
match =\> ["timestamp", "ISO8601"]  
}  
}

```
    if [fields][log_type] == "nojson" {

         grok {
                  match => {"message" => ["(?m)%{LOGLEVEL:level}\s*\[%{TIMESTAMP_ISO8601:timestamp}\]\s*\[(?<thread>[\w._.-]+)\]\s*(?<logger>[\w\.\w]+)\s*(?<message>[^{]*)","(?m)%{LOGLEVEL:level}\s*\[%{TIMESTAMP_ISO8601:timestamp}\]\s*\[(?<thread>[\w\-\s./]+)\]\s*%{UUID:requestid}(?<message>[^{]*)"] }

                }
        }

  }

```

output {

# stdout { codec =\> rubydebug }

```
    elasticsearch {
            hosts => ["localhost:9160"]
            index => "logstash-api-logs-%{+YYYY-MM-dd}"
            manage_template => false}

```

#file { path =\> "/opt/elk\_data/devops/devops-%{+YYYY-MM-dd}.log" }  
}

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [September 17, 2019, 2:18pm UTC](https://discuss.elastic.co/t/log-sequence-issue-in-kibana/199607/4 "2019-09-17T14:18:15Z")

</div>

Hey @Vipin_Gaur, I'd recommend posting your most recent reply as a new post in the Logstash topic. You'll get a more informed response over there.

---

<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:** [October 15, 2019, 2:18pm UTC](https://discuss.elastic.co/t/log-sequence-issue-in-kibana/199607/5 "2019-10-15T14:18:15Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
