OpenSearch/docs/en/watcher/input
Alexander Reelsen 6406c9816a Watcher: Add transform input for chained input (elastic/x-pack-elasticsearch#2861)
The chained input in watcher is a useful feature to
call several endpoints before execution a condition.
However it was pretty hard to modify data from a previous
input in order to be able to execute it in another input.

This commit adds a another input, called a `transform` input,
which allows you to do a transform as another input in a chained
input.

See this example

```
"input" : {
  "chain" : {
    "inputs" : [ <1>
      {
        "first" : {
          "simple" : { "path" : "/_search" }
        }
      },
      {
        "second" : {
          "transform" : {
            "script" : "return [ 'path' : 'ctx.payload.first.path' + '/' ]"
          }
        }
      },
      {
        "third" : {
          "http" : {
            "request" : {
              "host" : "localhost",
              "port" : 9200,
              "path" : "{{ctx.payload.second.path}}" <2>
            }
          }
        }
      }
    ]
  }
}
```

This allows for far more flexibility before executing the next input in a chained
one.

Original commit: elastic/x-pack-elasticsearch@3af9ba6e9b
2017-11-27 13:27:56 +01:00
..
chain.asciidoc Watcher: Add transform input for chained input (elastic/x-pack-elasticsearch#2861) 2017-11-27 13:27:56 +01:00
http.asciidoc Docs: Change port to be an integer in htttp input docs 2017-10-19 13:53:24 +02:00
search.asciidoc [DOCS] Add watcher and elevated privilege info (elastic/x-pack-elasticsearch#2632) 2017-09-26 13:26:02 -07:00
simple.asciidoc [DOCS] Create "en" translation directory (elastic/x-pack-elasticsearch#907) 2017-03-31 08:48:39 -07:00