Commit Graph

47 Commits

Author SHA1 Message Date
Jason Tedor c0790d6a49 Move x-pack-core to core package (elastic/x-pack-elasticsearch#3678)
This commit moves the source file in x-pack-core to a org.elasticsearch.xpack.core package. This is to prevent issues where we have compile-time success reaching through packages that will cross module boundaries at runtime (due to being in different classloaders). By moving these to a separate package, we have compile-time safety. Follow-ups can consider build time checking that only this package is defined in x-pack-core, or sealing x-pack-core until modules arrive for us.

Original commit: elastic/x-pack-elasticsearch@232e156e0e
2018-01-23 12:43:58 -06:00
Alexander Reelsen e15f1c36b5 Docs: Fix cross project link
Original commit: elastic/x-pack-elasticsearch@83ec5bd47c
2017-12-21 11:42:57 +01:00
Alexander Reelsen 8c99a4dc78 Watcher: Add refresh parameter to index action (elastic/x-pack-elasticsearch#3350)
This allows to configure the refresh parameter to the index action,
which is either applied to the resulting index or bulk request.

Relates elastic/apm-dev#76

Original commit: elastic/x-pack-elasticsearch@aedb6adc66
2017-12-21 10:18:16 +01:00
lcawley ab737982bb Merge remote-tracking branch 'upstream/master'
Original commit: elastic/x-pack-elasticsearch@5b94f9472a
2017-12-15 11:07:02 -08:00
lcawley d5e03f9bff [DOCS] Fixed troubleshooting titles
Original commit: elastic/x-pack-elasticsearch@4338580de6
2017-12-15 11:05:20 -08:00
Alexander Reelsen 5f8a0711f5 Watcher: Set index and type dynamically in index action (elastic/x-pack-elasticsearch#3264)
The index action allowed to set the id of a document dynamically,
however this was not allowed for the index or the type.

If a user wants to execute a search, modify the found documents and
index them back, then this would only work across a single index and a
single type. This change allows the watch writer to just take a search
result, read index and type out of that and configure this as part of
the index action.

On top of that the integration tests have been changed to become fast
running unit tests.

Original commit: elastic/x-pack-elasticsearch@640b085dd4
2017-12-15 16:59:29 +01:00
Alexander Reelsen 3f17c28f9b Docs: Remove note about running watches with elevated privileges
The documentation still mentioned that watches are running with elevated
privileges, which is not true anymore since elastic/x-pack-elasticsearch#2808.

Original commit: elastic/x-pack-elasticsearch@6b510d999a
2017-12-08 11:01:28 +01:00
Alexander Reelsen fdb02f4f99 Watcher: Fix pagerduty action to send context data (elastic/x-pack-elasticsearch#3185)
The pagerduty action allows to send contexts, which contains an array
of texts or images, each with a link.

The field of this data was named 'context' instead of 'contexts' and
thus those contects were never correctly parsed on the pagerduty side.

Unfortunately pagerduty accepts any JSON, thus this was not caught so
far.

This commit allows parsing of the old field name to retain BWC, but when
written out via toXContent, it will always use the 'contexts' field name.

relates elastic/x-pack-elasticsearch#3184

Original commit: elastic/x-pack-elasticsearch@50f0b65d56
2017-12-05 11:31:48 +01:00
Luca Cavanna 55a19ed394 Deprecate the transport client in favour of the high-level REST client (elastic/x-pack-elasticsearch#2779)
Original commit: elastic/x-pack-elasticsearch@2aeef5df3f
2017-12-01 12:24:26 +01:00
Alexander Reelsen c641a30bc5 Docs: Explain watcher security integration/limitations (elastic/x-pack-elasticsearch#3106)
Original commit: elastic/x-pack-elasticsearch@991e1de267
2017-11-29 14:48:06 +01:00
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
lcawley 79cb3a8a2c [DOCS] Fixed typo
Original commit: elastic/x-pack-elasticsearch@a2da8f644f
2017-11-22 10:02:24 -08:00
Lisa Cawley 712e740761 [DOCS] Added sysgenkey command and watcher encryption settings (elastic/x-pack-elasticsearch#3043)
* [DOCS] Added sysgenkey command and watcher settings

* [DOCS] Added data encryption task for Watcher

* [DOCS] Addressed feedback about watcher encryption

Original commit: elastic/x-pack-elasticsearch@edb1fccbfb
2017-11-20 08:44:43 -08:00
Alexander Reelsen a90cd81f99 Docs: Fix broken watcher example using multi line strings
Original commit: elastic/x-pack-elasticsearch@7398be67c4
2017-11-10 10:06:47 +01:00
Alexander Reelsen 4d265868b8 Docs: Improve watcher action condition docs (elastic/x-pack-elasticsearch#2909)
The action condition feature was carefully hidden in an example.
This commit creates an own paragraph to highlight this feature better.

Original commit: elastic/x-pack-elasticsearch@006318787b
2017-11-09 16:13:56 +01:00
Lisa Cawley 7e91fc3feb [DOCS] Fixed typo in Watcher email actions (elastic/x-pack-elasticsearch#2829)
Original commit: elastic/x-pack-elasticsearch@1468a76b6d
2017-11-02 09:55:51 -07:00
Lisa Cawley 8888922af8 [DOCS] Fixed email action typo in watcher (elastic/x-pack-elasticsearch#2849)
Original commit: elastic/x-pack-elasticsearch@80795a0c07
2017-11-02 09:29:20 -07:00
Alexander Reelsen b76c85e7fd Docs: Change port to be an integer in htttp input docs
Original commit: elastic/x-pack-elasticsearch@768ec54e03
2017-10-19 13:53:24 +02:00
Alexander Reelsen cadfd03529 Watcher: Allow JIRA path to be custom chosen (elastic/x-pack-elasticsearch#2682)
The path of a JIRA endpoint used to be fixed. This commit allows the
path to be dynamic, so that users can deploy their JIRA instance under
an arbitrary prefix.

Original commit: elastic/x-pack-elasticsearch@7702505114
2017-10-10 08:55:28 +02:00
Lisa Cawley 95a5d36289 [DOCS] Add watcher and elevated privilege info (elastic/x-pack-elasticsearch#2632)
Original commit: elastic/x-pack-elasticsearch@2dcbace8a0
2017-09-26 13:26:02 -07:00
lcawley c3b658df88 [DOCS] Fixed broken link to put watch API
Original commit: elastic/x-pack-elasticsearch@f36caaa371
2017-09-14 14:12:20 -07:00
Deb Adair 30f2b3f90e [DOCS] Fixing cross doc links.
Original commit: elastic/x-pack-elasticsearch@3333055f42
2017-07-20 11:25:02 -07:00
Deb Adair 3ace57d512 [DOCS] Updates to make GS minidoc build.
Original commit: elastic/x-pack-elasticsearch@04c168e653
2017-07-20 11:24:57 -07:00
Drew Raines 49407c1069 [DOCS] Fix typo
Original commit: elastic/x-pack-elasticsearch@1aaaa88404
2017-07-14 14:31:53 -05:00
Tim Brooks f2cbe20ea0 Remove default passwords from reserved users (elastic/x-pack-elasticsearch#1665)
This is related to elastic/x-pack-elasticsearch#1217. This PR removes the default password of
"changeme" from the reserved users.

This PR adds special behavior for authenticating the reserved users. No
ReservedRealm user can be authenticated until its password is set. The
one exception to this is the elastic user. The elastic user can be
authenticated with an empty password if the action is a rest request
originating from localhost. In this scenario where an elastic user is
authenticated with a default password, it will have metadata indicating
that it is in setup mode. An elastic user in setup mode is only
authorized to execute a change password request.

Original commit: elastic/x-pack-elasticsearch@e1e101a237
2017-06-29 15:27:57 -05:00
Lisa Cawley b9a7dcdcc4 [DOCS] Move watcher APIs to Elasticsearch Ref (elastic/x-pack-elasticsearch#1869)
* [DOCS] Move watcher APIs to Elasticsearch Ref

* [DOCS] Update links to Watcher APIs

Original commit: elastic/x-pack-elasticsearch@5b6e903366
2017-06-27 17:16:51 -07:00
Deb Adair 806b0bc710 [DOCS] Removed UI and Logstash settings & updated links to that info.
Original commit: elastic/x-pack-elasticsearch@2434e503dd
2017-06-26 09:04:56 -07:00
Lisa Cawley 8103a1bf8b [DOCS] Fix broken links (elastic/x-pack-elasticsearch#1799)
Original commit: elastic/x-pack-elasticsearch@7ff7ff1dbc
2017-06-20 17:41:16 -07:00
Lisa Cawley 1b3b7f2944 [DOCS] Update links in X-Pack Reference for Reporting info (elastic/x-pack-elasticsearch#1584)
* [DOCS] Update links to Reporting docs

* [DOCS] Fix incomplete link

Original commit: elastic/x-pack-elasticsearch@c3ccafb191
2017-06-20 15:38:27 -07:00
Alexander Reelsen d6254c9fd3 Watcher: Add proxy support for reporting attachment action (elastic/x-pack-elasticsearch#1781)
This allows to configure a proxy for the reporting attachment
action. The proxy is used by the HTTP client.

Original commit: elastic/x-pack-elasticsearch@87b6ab1b68
2017-06-20 13:49:32 +02:00
Ryan Ernst c1a3f50e19 Convert script uses to use source/id keys (elastic/x-pack-elasticsearch#1670)
This is the xpack side of
https://github.com/elastic/elasticsearch/pull/25127

Original commit: elastic/x-pack-elasticsearch@e25bd90825
2017-06-09 08:29:36 -07:00
Alexander Reelsen 521b7a1940 Watcher: Support setting of markdown in attachments (elastic/x-pack-elasticsearch#1492)
Watcher: Support setting of markdown in attachments

This allows to set the `mrkdwn_in` array in slack attachments to specify which fields should contain markdown.
See https://api.slack.com/docs/message-formatting#message_formatting

This is mainly useful for the text and pretext fields in an attachment.

relates elastic/x-pack-elasticsearch#403

Original commit: elastic/x-pack-elasticsearch@ee4180e4bf
2017-05-23 13:33:00 +02:00
debadair 5353c35420 [DOCS] Removed references to file-based scripts.
Original commit: elastic/x-pack-elasticsearch@f0462e2f69
2017-05-18 11:18:11 -07:00
Clinton Gormley aba877e6a2 Removed reference to file-based scripts
Relates to https://github.com/elastic/elasticsearch/pull/24627

Original commit: elastic/x-pack-elasticsearch@7a59422e5d
2017-05-18 09:17:46 +02:00
Lisa Cawley f44302740d [DOCS] Fix build error related to bad link (elastic/x-pack-elasticsearch#1470)
Original commit: elastic/x-pack-elasticsearch@d56fe65df6
2017-05-17 17:16:34 -07:00
Ryan Ernst f7705eac86 Remove file scripts (elastic/x-pack-elasticsearch#1399)
This is the xpack side of elastic/elasticsearch#24627


Original commit: elastic/x-pack-elasticsearch@4d1c745d74
2017-05-17 14:42:46 -07:00
Lee Hinman 8fe2ba02f2 [TEST] Use non-deprecated _key instead of _term for aggregation ordering
Otherwise the console doc tests fail due to the unexpected warning header

Original commit: elastic/x-pack-elasticsearch@598a191784
2017-05-11 12:26:31 -06:00
Alexander Reelsen 4078b2f1b2 Watcher: Replace _status field with status (elastic/x-pack-elasticsearch#1285)
As fields with underscores will be disallowed in master, and we have to
prepare the upgrade, this commit renames the _status field to status.

When the 5.x upgrade logic is in place in the 5.x we can remove all the
old style _status handling from the master branch.

Note: All the BWC compatibility tests, that load 5.x indices are now
faking a finished upgrade by adding the `status` field to the mapping
of the watches index.

Original commit: elastic/x-pack-elasticsearch@9d5cc9aaec
2017-05-04 10:08:34 +02:00
Alexander Reelsen c62f6f8177 Watcher: Distributed watch execution (elastic/x-pack-elasticsearch#544)
The distribution of watches now happens on the node which holds the
watches index, instead of on the master node. This requires several
changes to the current implementation.

1. Running on shards and replicas
   In order to run watches on the nodes with the watches index on its
   primaries and replicas. To ensure that watches do not run twice, there is
   a logic which checks the local shards, runs a murmurhash on the id and
   runs modulo against the number of shards and replicas, this is the way to
   find out, if a watch should run local. Reloading happens
2. Several master node actions moved to a HandledTransportAction, as they
   are basically just aliases for indexing actions, among them the
   put/delete/get watch actions, the acknowledgement action, the de/activate
   actions
3. Stats action moved to a broadcast node action, because we potentially
   have to query every node to get watcher statistics
4. Starting/Stopping watcher now is a master node action, which updates
   the cluster state and then listeners acts on those. Because of this watches
   can be running on two systems, if you those have different cluster state
   versions, until the new watcher state is propagated
5. Watcher is started on all nodes now. With the exception of the ticker
   schedule engine most classes do not need a lot of resources while running.
   However they have to run, because of the execute watch API, which can hit
   any node - it does not make sense to find the right shard for this watch
   and only then execute (as this also has to work with a watch, that has not
   been stored before)
6. By using a indexing operation listener, each storing of a watch now
   parses the watch first and only stores on successful parsing
7. Execute watch API now uses the watcher threadpool for execution
8. Getting the number of watches for the stats now simply queries the
   different execution engines, how many watches are scheduled, so this is
   not doing a search anymore

There will be follow up commits on this one, mainly to ensure BWC compatibility.

Original commit: elastic/x-pack-elasticsearch@0adb46e658
2017-05-02 10:12:46 +02:00
Clinton Gormley e61224778f Fixed bad link
Original commit: elastic/x-pack-elasticsearch@f7ab965eba
2017-04-28 12:35:07 +02:00
lcawley b0bfca6a11 [DOCS] Fix watcher typo
Original commit: elastic/x-pack-elasticsearch@f970206d1d
2017-04-19 15:58:09 -07:00
Shaunak Kashyap 1f75dec642 Adding limitations of Watch Edit page (elastic/x-pack-elasticsearch#1014)
* Adding limitations of Watch Edit page

* Removing image reference for now until image dir referencing is sorted out

* More end-user-friendly phrasing

* Language changes + bringing back image

Original commit: elastic/x-pack-elasticsearch@06bf93ee99
2017-04-19 11:12:54 -07:00
Shaunak Kashyap 618341db6c Amending docs on security privileges required for Watcher (elastic/x-pack-elasticsearch#1086)
* Amending docs on security privileges required for Watcher

Previously, the watcher_user and watcher_admin roles did not exist so we documented the actual security privileges necessary. Now that these roles exist and encapsulate the security privileges, we update the documentation to refer to the roles instead.

* Breaking up sentences. Putting main content up front.

* Include triggered watches as well

* Emphasize read-only operations

Original commit: elastic/x-pack-elasticsearch@720d84557c
2017-04-19 04:21:43 -07:00
debadair ac441fab57 [DOCS] Migrating images to separate x-pack repos.
Original commit: elastic/x-pack-elasticsearch@80317c063b
2017-04-18 13:13:12 -07:00
Shaunak Kashyap 01a8f5a0b3 Document security privileges required for using Watcher (elastic/x-pack-elasticsearch#1012)
* Document security privileges required for using Watcher

* Fixing index names

* Language fixes

Original commit: elastic/x-pack-elasticsearch@56ef06d077
2017-04-11 04:22:45 -07:00
debadair 40fc8058e5 [DOCS] Fixed includes to correctly reference other repos.
Original commit: elastic/x-pack-elasticsearch@f6a0d09575
2017-04-07 17:32:03 -07:00
lcawl 436706f851 [DOCS] Create "en" translation directory (elastic/x-pack-elasticsearch#907)
Confirmed with @debadair, going ahead with merge

Original commit: elastic/x-pack-elasticsearch@c510ddfe9e
2017-03-31 08:48:39 -07:00