Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong number of arguments (2 for 1) when using the %{field} syntax for the timezone setting #68

Closed
dkirrane opened this issue Sep 12, 2016 · 1 comment
Labels

Comments

@dkirrane
Copy link

  • Version: logstash:2.3.4-1
  • Operating System: Ubuntu running Logstash Docker logstash:2.3.4-1

Logstash throws the following when I use a timezone => "%{timezone}" field which is part of the event:

{:timestamp=>"2016-09-12T11:26:34.487000+0000", :message=>"Failed parsing date from field", :field=>"log_timestamp", :value=>"2016-09-10 20:13:50,769", :exception=>"wrong number of arguments (2 for 1)", :config_parsers=>"YYYY-MM-dd HH:mm:ss,SSS", :config_locale=>"en", :level=>:warn}
filter {

    if [type]  == "app" {

        grok {
            match => [
                "message", "%{YEAR:year}-%{MONTHNUM:month}-%{MONTHDAY:day} %{TIME:time},%{INT:ms} %{DATA:logger} - %{GREEDYDATA:message}"
            ]
            overwrite => [ "message" ]
            add_field => [ "event_timestamp", "%{@timestamp}" ]
            add_field => [ "log_timestamp", "%{year}-%{month}-%{day} %{time},%{ms}" ]
            remove_field => [ "year","month","day","time","ms"]
        }

        date {
            match => [ "log_timestamp", "YYYY-MM-dd HH:mm:ss,SSS" ]
            locale => "en"
            timezone => "%{timezone}"
        }
    }
}

@jsvd jsvd added the bug label Sep 12, 2016
@dkirrane
Copy link
Author

dkirrane commented Sep 12, 2016

I think this maybe because of the timezone field generated by log-courier does not use joda timezone ids.
So opened an issue with log-courier
driskell/log-courier#345

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants