# Logstash @timestamp not including milliseconds

**URL:** <https://discuss.elastic.co/t/logstash-timestamp-not-including-milliseconds/337579>\
**Category:** Logstash\
**Created:** [July 4, 2023, 3:44pm UTC](https://discuss.elastic.co/t/logstash-timestamp-not-including-milliseconds/337579 "2023-07-04T15:44:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anthony\_Zottola](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anthony_zottola/32/122198_2.png) [@Anthony\_Zottola](https://discuss.elastic.co/u/Anthony_Zottola)\
**Post date:** [July 4, 2023, 3:44pm UTC](https://discuss.elastic.co/t/logstash-timestamp-not-including-milliseconds/337579/1 "2023-07-04T15:44:45Z")

</div>

All of my logs have this format "@timestamp" =\> 2023-07-04T15:40:19.000Z where the milliseconds are missing, is there any way to make it included the milliseconds.

I tried manually adding it but it is read only.

My conf looks like this:

```auto
input {
   syslog {
      port => 5014
      timezone => "America/New_York"
   }
}

filter {
}

output {
   elasticsearch {
      action => "index"
      hosts => ["localhost:9200"]
      user => "elastic"
      password => "changeme"
      index => ["oursyslogs"]
    }
   stdout {
      codec => rubydebug
 }
}

```

Any help would be appreciated

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 4, 2023, 4:13pm UTC](https://discuss.elastic.co/t/logstash-timestamp-not-including-milliseconds/337579/2 "2023-07-04T16:13:11Z")

</div>

A syslog input [parses the timestamp](https://github.com/logstash-plugins/logstash-input-syslog/blob/7a544560fd7171105f27ffd66db7dc49b542345e/lib/logstash/inputs/syslog.rb#L119) in the syslog message, and syslog timestamps do not include sub-second precision, so you will never have milliseconds.

---

<div class="post-metadata">

**Author:** ![Anthony\_Zottola](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anthony_zottola/32/122198_2.png) [@Anthony\_Zottola](https://discuss.elastic.co/u/Anthony_Zottola)\
**Post date:** [July 4, 2023, 4:17pm UTC](https://discuss.elastic.co/t/logstash-timestamp-not-including-milliseconds/337579/3 "2023-07-04T16:17:08Z")

</div>

Ah it is a problem with the syslog sending server and not the receiving one running logstash. Thank you!

---

<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:** [August 1, 2023, 4:17pm UTC](https://discuss.elastic.co/t/logstash-timestamp-not-including-milliseconds/337579/4 "2023-08-01T16:17:25Z")

</div>

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