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

Field names cannot contain the . character in Elasticsearch 2.0 #20

Closed
cookandy opened this issue Nov 6, 2015 · 3 comments
Closed

Field names cannot contain the . character in Elasticsearch 2.0 #20

cookandy opened this issue Nov 6, 2015 · 3 comments

Comments

@cookandy
Copy link

cookandy commented Nov 6, 2015

Just to let you know, in Logstash 2.x field names cannot contain .

Until the template gets fixed, you can setup a filter on your logstash server to remove the periods

filter {
  ruby {
        code => "
          event.to_hash.keys.each { |k| event[ k.sub('.','_') ] = event.remove(k) if k.include?'.' }
        "
    }
}

See here https://discuss.elastic.co/t/field-name-cannot-contain/33251/11

@digital-wonderland
Copy link
Owner

Thanks a lot for the heads up. I opened elastic/elasticsearch#14594 to inquire if they intend to change that. If not I'll update the code to use / instead of ..

@digital-wonderland digital-wonderland changed the title Logstash 2.x issue Field names cannot contain the . character in Elasticsearch 2.0 Nov 6, 2015
@wallies
Copy link
Contributor

wallies commented Dec 11, 2015

@digital-wonderland First off, awesome solution for logstash-forwarder. I still get this issue, the problem is when some containers are using things like com.amazonaws.ecs.container-name and works.weave.role as their labels. Should I use the filter above or could you handle it in code?

@cookandy
Copy link
Author

I am also running into problems for some reason. Going to reopen this issue.

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

No branches or pull requests

3 participants