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

how to convert type of value in the new field? #46

Open
zffocussss opened this issue Aug 7, 2019 · 1 comment
Open

how to convert type of value in the new field? #46

zffocussss opened this issue Aug 7, 2019 · 1 comment

Comments

@zffocussss
Copy link

hi
I use this plugin to create a new key (or a new field),the value is "123",how can I get a integer 123?as I output it to EFK stack for statistics

@brutallino
Copy link

brutallino commented Aug 8, 2019

Hi. you must use fluent-plugin-elasticsearch and write own template with mapping field:
example_template:

{
  "index_patterns": ["logstash-*", "otherpattern-*"],
  "mappings": {
    "properties": {
        "size":{ "type": "integer"},
        "coordinates":{ "type": "geo_point"},
        "remote":{ "type": "ip"},
        "code":{ "type": "short"}
    }
  }
}

and configure fluent in elasticsearch section like:
...
template_file /fluentd/etc/example_template
template_name example_template
template_overwrite true
max_retry_putting_template 15
...

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

2 participants