OpenSearch/elasticsearch
Alexander Reelsen baf1596418 Watcher: Introduce dedicated reporting attachment type (elastic/elasticsearch#3665)
Instead of using the long running and long blocking single polling HTTP attachment for our reporting,
we should use the async API provided by kibana. The new workflow (all blocking and in a single watch)
looks like this:

1. An initial request is sent to trigger the report generation, which returns a path
2. This path is used to continuously check if the report is done (then it is sent back) or kibana sends another HTTP error code, which will result in watcher to sleep for another interval until the report is finally returned.

Features include configurable interval time and retry count, so that the total amount of waiting can be tweaked into two directions.

This is what the reporting type looks like right now

```
{
   "my-attachment":{
      "reporting":{
         "url":"http://www.example.org/my-dashboard",
         "retries":6, // optional, default 40
         "interval":"1s", // optional, default 15s
         "auth":{
            "basic":{
               "username":"foo",
               "password":"secret"
            }
         }
      }
   }
}
```

The interval/retries can also be configured via settings.

Note, that this is just a temporal workaround until the watcher execution can execute in an asynchronous fashion.

Closes elastic/elasticsearch#3524

Original commit: elastic/x-pack-elasticsearch@d1eaa856b9
2016-10-19 12:21:25 +02:00
..
bin/x-pack Build: Reorganize src roots 2016-10-01 09:46:43 +02:00
config/x-pack Build: Reorganize src roots 2016-10-01 09:46:43 +02:00
keys Collapsed license code into xpack src 2016-09-29 12:22:19 +02:00
src Watcher: Introduce dedicated reporting attachment type (elastic/elasticsearch#3665) 2016-10-19 12:21:25 +02:00
NOTICE.txt Moved directories around 2016-09-29 12:03:14 +02:00
build.gradle Fix xpack api jar artifact naming 2016-10-03 19:25:44 -07:00