# Logstash 5.0 configuration.invalid\_plugin\_register error in logs when using date filter

**URL:** <https://discuss.elastic.co/t/logstash-5-0-configuration-invalid-plugin-register-error-in-logs-when-using-date-filter/68276>\
**Category:** Logstash\
**Created:** [December 7, 2016, 10:09am UTC](https://discuss.elastic.co/t/logstash-5-0-configuration-invalid-plugin-register-error-in-logs-when-using-date-filter/68276 "2016-12-07T10:09:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![orl1978](https://avatars.discourse-cdn.com/v4/letter/o/c6cbf5/32.png) [@orl1978](https://discuss.elastic.co/u/orl1978)\
**Post date:** [December 7, 2016, 10:09am UTC](https://discuss.elastic.co/t/logstash-5-0-configuration-invalid-plugin-register-error-in-logs-when-using-date-filter/68276/1 "2016-12-07T10:09:02Z")

</div>

hi there,

I have the following config for logstash:

```
`input {
  file {
      path => "/csvfiles/*.csv"
      type => "agents"
      start_position => "beginning"
      sincedb_path => "/csvfiles/dbfile"
  }
}

filter {
csv {
    columns => ['Listingid', 'Listingdate', 'Status', 'Recorddate']
    separator => ","
}

date{
add_field => { "foo" => "Hello world" }
}

}

output {
  elasticsearch {
hosts => ["localhost:9200"]
document_type => "node_points"
template => "/etc/logstash/agent_template.json"
index => "agent_simple"
}
}`

```

Without the date element under filter everything works fine, when I add that I get the following in the logs:

`[2016-12-06T16:27:55,746][ERROR][logstash.agent] Pipeline aborted due to error {:exception=>#<LogStash::ConfigurationError: translation missing: en.logstash.agent.configuration.invalid_plugin_register>, :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-date-3.0.3/lib/logstash/filters/date.rb:175:in`register'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:197:in `start_workers'", "org/jruby/RubyArray.java:1613:in`each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:197:in `start_workers'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:153:in`run'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:250:in `start_pipeline'"]}`

I have tried modifying the date field, wrapping it in its own filter parent value but always get the same error in the logs.

I am using version 5.0 of the stack on Ubuntu.

Any help greatly appreciated.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [December 7, 2016, 10:21am UTC](https://discuss.elastic.co/t/logstash-5-0-configuration-invalid-plugin-register-error-in-logs-when-using-date-filter/68276/2 "2016-12-07T10:21:12Z")

</div>

I'm not sure what you're trying to do with your date filter, but the `match` option is mandatory. Here's the error you should've seen in the log:

> The match setting should contains first a field name and at least one date format, current value is ...

---

<div class="post-metadata">

**Author:** ![orl1978](https://avatars.discourse-cdn.com/v4/letter/o/c6cbf5/32.png) [@orl1978](https://discuss.elastic.co/u/orl1978)\
**Post date:** [December 7, 2016, 10:39am UTC](https://discuss.elastic.co/t/logstash-5-0-configuration-invalid-plugin-register-error-in-logs-when-using-date-filter/68276/3 "2016-12-07T10:39:04Z")

</div>

Hi Magnus,

I started out with the intention of setting the Recorddate field to be the @timestamp BUT in order to debug the issues had resorted to one of the the samples from the logstash documentation while I get it working, to reduce the complexity.

Will include the match setting and see how it goes. There was no evidence relating to match setting being mandatory in the logs.

Thanks

---

<div class="post-metadata">

**Author:** ![orl1978](https://avatars.discourse-cdn.com/v4/letter/o/c6cbf5/32.png) [@orl1978](https://discuss.elastic.co/u/orl1978)\
**Post date:** [December 7, 2016, 3:06pm UTC](https://discuss.elastic.co/t/logstash-5-0-configuration-invalid-plugin-register-error-in-logs-when-using-date-filter/68276/4 "2016-12-07T15:06:01Z")

</div>

Hi Magnus

Managed to get further now with:

```
filter {
date{
    match => ["Recorddate", "dd-MMM-yyyy HH:mm:ss"]
}
}

```

In the logs now I get:

Failed parsing date from field {:field=\>"Recorddate", :value=\>"Recorddate", :exception=\>"Invalid format: "Recorddate"", :config\_parsers=\>"dd-MMM-yyyy HH:mm:ss", :config\_locale=\>"default=en\_US"}

Yet the format I have provided I think it correct.

Recorddate looks like this:

"15-Nov-2016 23:49:01"

Thanks again.

---

<div class="post-metadata">

**Author:** ![orl1978](https://avatars.discourse-cdn.com/v4/letter/o/c6cbf5/32.png) [@orl1978](https://discuss.elastic.co/u/orl1978)\
**Post date:** [December 9, 2016, 9:06am UTC](https://discuss.elastic.co/t/logstash-5-0-configuration-invalid-plugin-register-error-in-logs-when-using-date-filter/68276/5 "2016-12-09T09:06:50Z")

</div>

Hi Magnus,

Have added a locale =\> "en" but still receive the same date formatting error.

Any help appreciated.

---

<div class="post-metadata">

**Author:** ![orl1978](https://avatars.discourse-cdn.com/v4/letter/o/c6cbf5/32.png) [@orl1978](https://discuss.elastic.co/u/orl1978)\
**Post date:** [December 13, 2016, 1:05pm UTC](https://discuss.elastic.co/t/logstash-5-0-configuration-invalid-plugin-register-error-in-logs-when-using-date-filter/68276/6 "2016-12-13T13:05:12Z")

</div>

Can I reach out on this issue Magnus please?

All the best

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [December 13, 2016, 1:09pm UTC](https://discuss.elastic.co/t/logstash-5-0-configuration-invalid-plugin-register-error-in-logs-when-using-date-filter/68276/7 "2016-12-13T13:09:58Z")

</div>

The error message suggests that the parsing fails because the `Recorddate` field contains the string "Recorddate", which isn't consistent with what you're saying. If `Recorddate` really contains "15-Nov-2016 23:49:01" I don't know what's up.

---

<div class="post-metadata">

**Author:** ![orl1978](https://avatars.discourse-cdn.com/v4/letter/o/c6cbf5/32.png) [@orl1978](https://discuss.elastic.co/u/orl1978)\
**Post date:** [December 13, 2016, 1:25pm UTC](https://discuss.elastic.co/t/logstash-5-0-configuration-invalid-plugin-register-error-in-logs-when-using-date-filter/68276/8 "2016-12-13T13:25:46Z")

</div>

Thats great Magnus thank you. I suspect whats happening is the csv parser ignores the first line that contains the csv column names, whereas this filter doesn't and so reads an incorrect value.

---

<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:** [January 10, 2017, 1:26pm UTC](https://discuss.elastic.co/t/logstash-5-0-configuration-invalid-plugin-register-error-in-logs-when-using-date-filter/68276/9 "2017-01-10T13:26:45Z")

</div>

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