# Month names in english with pattern MMM

**URL:** <https://discuss.elastic.co/t/month-names-in-english-with-pattern-mmm/139736>\
**Category:** Logstash\
**Created:** [July 12, 2018, 11:09am UTC](https://discuss.elastic.co/t/month-names-in-english-with-pattern-mmm/139736 "2018-07-12T11:09:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Upsilon](https://avatars.discourse-cdn.com/v4/letter/u/e56c9b/32.png) [@Upsilon](https://discuss.elastic.co/u/Upsilon)\
**Post date:** [July 12, 2018, 11:09am UTC](https://discuss.elastic.co/t/month-names-in-english-with-pattern-mmm/139736/1 "2018-07-12T11:09:35Z")

</div>

Hello,

The @timestamp format I have is the following : « 2018-07-10T11:04:14.452Z ». And I would like to have in output this format : « Jul 10 13:09:12 ».

Here is my configuration in order to do that :

```
input {
	kafka {
		id => "kafka_input"
		client_id => "TEST-client"
		bootstrap_servers => " ***********"
		group_id => "TEST-group"
		topics => ["TEST"]
		decorate_events => true
	}
}

output {
	file {
		path => "/var/log/logstash/output/test_P.txt"
		codec => line { format => "<5> %{+MMM dd HH:mm:ss} test.domaine.lan %{message}" }
	}
}

```

But the output logs have the following format :  
▪ « \<5\> **juil.** 11 15:37:12 test.domaine.lan {"version":"…. »

The month is in french(« **juil.** ») and i would like to have it in english (« **jul** »).  
Do you know how to do that ?

I try to add the filter below. But I get an error message  
`filter {	date {	locale => "en"	}}`

> translation missing: en.logstash.agent.configuration.invalid\_plugin\_register

Thanks in advance for your help.

---

<div class="post-metadata">

**Author:** ![Upsilon](https://avatars.discourse-cdn.com/v4/letter/u/e56c9b/32.png) [@Upsilon](https://discuss.elastic.co/u/Upsilon)\
**Post date:** [July 16, 2018, 8:28am UTC](https://discuss.elastic.co/t/month-names-in-english-with-pattern-mmm/139736/2 "2018-07-16T08:28:25Z")

</div>

Any guess ?

---

<div class="post-metadata">

**Author:** ![Upsilon](https://avatars.discourse-cdn.com/v4/letter/u/e56c9b/32.png) [@Upsilon](https://discuss.elastic.co/u/Upsilon)\
**Post date:** [July 18, 2018, 9:23am UTC](https://discuss.elastic.co/t/month-names-in-english-with-pattern-mmm/139736/3 "2018-07-18T09:23:07Z")

</div>

In case someone is interested. I found out a way to bypass this issue, I parsed the timestamp in a ruby filter.

```
input {
	kafka {
		id => "kafka_input"
		client_id => "TEST-client"
		bootstrap_servers => " ***********"
		group_id => "TEST-group"
		topics => ["TEST"]
		decorate_events => true
	}
}

filter {
	ruby {
		init => "require 'date'"
		code => "
			event.set('month' , Date.strptime(event.get('@timestamp').to_s, '%Y-%m-%dT%H:%M:%S.%LZ').strftime('%b'))
		"
	}
}

output {
	file {
		path => "/var/log/logstash/output/test_P.txt"
		codec => line { format => "<5> %{month} %{+dd HH:mm:ss} test.domaine.lan %{message}" }
	}
}
```

---

<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 15, 2018, 9:27am UTC](https://discuss.elastic.co/t/month-names-in-english-with-pattern-mmm/139736/4 "2018-08-15T09:27:05Z")

</div>

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