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

Support for script_fields #73

Open
consulthys opened this issue Jun 7, 2017 · 1 comment
Open

Support for script_fields #73

consulthys opened this issue Jun 7, 2017 · 1 comment

Comments

@consulthys
Copy link

Right now, this plugin only supports retrieving data from the _source field. Since the query parameter support the full search DSL, it would be great to also be able to enrich the event with data coming from script_fields.

For instance, it should be possible to configure the elasticsearch input like this:

input {
   elasticsearch {
     hosts => ["localhost:9200"]
     index => "twitter"
     query => '{"script_fields": {"ts": {"script": "doc._timestamp.value"}}, "_source":["*"]}'
     script_fields => true
  }
}

And the resulting events should look like this

{
       "message" => "My Tweet",
          "user" => 5672323424242,
            "ts" => 1496806671021,
      "@version" => "1",
    "@timestamp" => "2017-06-07T05:40:14.233Z"
}
consulthys added a commit to consulthys/logstash-input-elasticsearch that referenced this issue Jun 7, 2017
@xiaoxuez
Copy link

xiaoxuez commented Feb 2, 2018

Hi, I want to use this feather, but i get the gem from '/bin/logstash-plugin install ..' which version is 4.0.3, could u update the image to 4.0.4 ? thx

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