Commit Graph

1645 Commits

Author SHA1 Message Date
Nik Everett 375ec896ce SQL: Move top level sql directory into plugin/sql (elastic/x-pack-elasticsearch#3618)
This will conform to how we want the x-pack repo structured.

relates elastic/x-pack-elasticsearch#3363

Original commit: elastic/x-pack-elasticsearch@f67e597bc8
2018-01-18 11:15:02 -05:00
Nik Everett 9b6f417df6 SQL: Move the jdbc directory into plugin/sql (elastic/x-pack-elasticsearch#3617)
This is the next step in removing the top level `sql` directory.

Related to elastic/x-pack-elasticsearch#3363

Original commit: elastic/x-pack-elasticsearch@948c3e3583
2018-01-18 09:33:16 -05:00
Nik Everett 753d21f3c6 SQL: Move CLI into plugin/sql directory (elastic/x-pack-elasticsearch#3606)
This is the next step in removing the top level sql directory.

I named the directory `sql-cli` instead of `cli` because that puts it at
the maven coordinates `org.elasticsearch.plugin:sql-cli` instead of
`org.elasticsearch.plugin:cli`.

Relates to elastic/x-pack-elasticsearch#3363

Original commit: elastic/x-pack-elasticsearch@d41a57a136
2018-01-18 08:39:02 -05:00
Nik Everett 310d1d2302 SQL: Move `sql:server` to `plugin:sql` (elastic/x-pack-elasticsearch#3604)
This moves SQL's server project into `plugin:sql` without modifying how the integration is performed. I know that it is not correct with regards to the x-pack modularization but I think it is a good first step.

Original commit: elastic/x-pack-elasticsearch@2f40d02e4d
2018-01-17 15:48:58 -05:00
Igor Motov c3b82e5ee1 SQL: Remove test-utils project (elastic/x-pack-elasticsearch#3583)
Makes Sql Translate Action consistent with other SQL Actions and removes test-utils project

Follow up for elastic/x-pack-elasticsearch#3543

Original commit: elastic/x-pack-elasticsearch@8ff2148d67
2018-01-17 12:18:25 -05:00
Igor Motov 35b45e9a14 Merge remote-tracking branch 'elastic/master' into feature/sql_2
Original commit: elastic/x-pack-elasticsearch@5322205268
2018-01-16 14:43:54 -05:00
Jason Tedor 8a0a14b9a3 Adapt to compile and runtime Java home distinction
We now separate the compiler Java home from the time runtime Java home
(the one that is used to compile class files versus the one that is used
to run tests). This commit adapts x-pack-elasticsearch to this change.

Relates elastic/x-pack-elasticsearch#3477

Original commit: elastic/x-pack-elasticsearch@bdb096e21c
2018-01-16 13:45:42 -05:00
Igor Motov 12d4f10faa SQL: Switch JDBC to REST protocol (elastic/x-pack-elasticsearch#3543)
Replaces binary serialization protocol in JDBC driver with the common REST protocol.

relates elastic/x-pack-elasticsearch#3419

Original commit: elastic/x-pack-elasticsearch@532c106658
2018-01-16 13:26:06 -05:00
Costin Leau 448511e093 Merge remote-tracking branch 'remotes/upstream/master' into feature/sql_2
Original commit: elastic/x-pack-elasticsearch@2c78f17486
2018-01-16 17:11:37 +02:00
Dimitris Athanasiou 368c4fff56 [ML] Expand job groups on scheduled events update (elastic/x-pack-elasticsearch#3577)
Relates elastic/x-pack-elasticsearch#3016

Original commit: elastic/x-pack-elasticsearch@73334d8e01
2018-01-16 11:53:37 +00:00
Dimitrios Athanasiou 0b8723015f [ML] Capitalize first letter in error message
Original commit: elastic/x-pack-elasticsearch@7062851357
2018-01-16 11:50:39 +00:00
Dimitris Athanasiou 2350b85507 [ML] Improve error on get calendar when ml-meta index is missing (elastic/x-pack-elasticsearch#3576)
Relates elastic/x-pack-elasticsearch#3016

Original commit: elastic/x-pack-elasticsearch@bc60a0cb72
2018-01-16 11:00:07 +00:00
Alexander Reelsen ac2884f034 Watcher: Fix NPE in watcher index template registry (elastic/x-pack-elasticsearch#3571)
The current code throws an NPE, when there is no master node available
in the cluster state. This commit adds an additional check for an
existing master node.

relates elastic/x-pack-elasticsearch#3569

Original commit: elastic/x-pack-elasticsearch@e0024b5170
2018-01-16 10:11:12 +01:00
Dimitris Athanasiou 6c6dcafd0e [ML] Improve error message when post-calendar-events-request is empty (elastic/x-pack-elasticsearch#3572)
Relates elastic/x-pack-elasticsearch#3016

Original commit: elastic/x-pack-elasticsearch@3d25ed4723
2018-01-15 18:13:50 +00:00
Dimitris Athanasiou aff9a4a2ba [ML] Autodetect should receive events from the earliest valid timestamp (elastic/x-pack-elasticsearch#3570)
When events are searched to be passed to the autodetect process, they
are currently calculated based on the latest record timestamp, when
a job opens, and `now` when the process is updated.

This commit changes both to be consistent and based on the earliest
valid timestamp for the job. The earliest valid timestamp is the
latest record timestamp minus the job latency.

Relates elastic/x-pack-elasticsearch#3016

Original commit: elastic/x-pack-elasticsearch@7f882ea053
2018-01-15 18:07:48 +00:00
Tim Brooks 5eef187b19 Modify x-pack to support elasticsearch-core jar (elastic/x-pack-elasticsearch#3544)
This is related to elastic/elasticsearch#27933. It modifies x-pack to be
compatible with the new elasticsearch-core jar.

Original commit: elastic/x-pack-elasticsearch@42227b6034
2018-01-15 09:59:03 -07:00
Albert Zaharovits 93b8ef49e9 Fix CI failure elastic/x-pack-elasticsearch#3568
Bad test design & excessive randomness

Original commit: elastic/x-pack-elasticsearch@076d0b246a
2018-01-15 18:39:13 +02:00
Alexander Reelsen d4cddc12d0 Tests: Add @AwaitsFix annotation to flaky tests
These contribute to unstable builds, and should be reenabled on a
case by case base and worked on.

Original commit: elastic/x-pack-elasticsearch@a15338415a
2018-01-15 10:28:05 +01:00
Tim Sullivan c9aa4e3d59 [Monitoring] Add additional metric fields to Beats template (elastic/x-pack-elasticsearch#3337)
* [Monitoring] Add uptime.ms field to Beats template

* Add cpu mapping [WIP]

* sort fields

* hierarchical - no dots in fields

* add rss, more event metrics, system cpu and os load

* fix some mapping errors

Original commit: elastic/x-pack-elasticsearch@59cbcb4ee5
2018-01-12 14:26:04 -07:00
Igor Motov 70cea58262 Merge remote-tracking branch 'elastic/master' into feature/sql_2
Original commit: elastic/x-pack-elasticsearch@9ac41d008e
2018-01-12 15:35:56 -05:00
Igor Motov aba3f15d81 Add adding ability to associate an ID with tasks (elastic/x-pack-elasticsearch#3500)
X-Pack portion of elastic/elasticsearch#23250

Original commit: elastic/x-pack-elasticsearch@3c9a5d2d08
2018-01-12 15:34:28 -05:00
Jay Modi cec90f452a IndexLifecycleManager checks for index existense and up to date mappings (elastic/x-pack-elasticsearch#3515)
This change makes the IndexLifecycleManager check for both index existence and up to date mappings
on the index prior to executing the provided runnable. Doing this provides a mechanism to make
non-breaking mapping updates to the security index in minor versions.

relates elastic/x-pack-elasticsearch#3462

Original commit: elastic/x-pack-elasticsearch@80f05d83b4
2018-01-12 12:45:52 -07:00
Dimitris Athanasiou 73f8559fca [ML] Update process when filters or calendars are updated (elastic/x-pack-elasticsearch#3385)
Relates elastic/x-pack-elasticsearch#3325

Original commit: elastic/x-pack-elasticsearch@9da4973cda
2018-01-12 17:48:07 +00:00
David Kyle 86e9f63b19 [ML] Expect an array of events in request (elastic/x-pack-elasticsearch#3537)
* Expect an array of events in request

Original commit: elastic/x-pack-elasticsearch@f60bc0b544
2018-01-11 22:16:09 +00:00
jaymode 79a9576596 Test: do not wipe templates from clusters in audit tests
This commit adds both the security index template and the audit index template to the excluded
templates for the RemoteIndexAuditTrailStartingTests and IndexAuditTrailTests. By allowing the
templates to remain in place, we make it easier for subsequent tests in the suite to have their
audit trails started.

Relates elastic/x-pack-elasticsearch#435

Original commit: elastic/x-pack-elasticsearch@6e54de19f9
2018-01-11 14:32:23 -07:00
jaymode 858178602e Test: update TokenAuthIntegTests to modify document to test expiration
This change modifies how we test the deletion of expired documents to be in line with elastic/x-pack-elasticsearch#3468 and
also adds debugging output in case the failures in CI continue.

Relates elastic/x-pack-elasticsearch#2253

Original commit: elastic/x-pack-elasticsearch@979b5357f5
2018-01-11 13:25:07 -07:00
Igor Motov 915ed35e27 Merge remote-tracking branch 'elastic/master' into feature/sql_2
Original commit: elastic/x-pack-elasticsearch@02fddccd84
2018-01-11 13:41:40 -05:00
Tim Brooks 0a8e4da3bd Support changing name of core module to server (elastic/x-pack-elasticsearch#3532)
This is related to elastic/elasticsearch#28178. It modifies x-pack to be
compatible with the elasticsearch core module to server name change.

Original commit: elastic/x-pack-elasticsearch@c8d313f882
2018-01-11 11:30:45 -07:00
David Roberts c647d7f38b [ML] Adjust BWC for categorization analyzer config after backporting elastic/x-pack-elasticsearch#3372
Original commit: elastic/x-pack-elasticsearch@27fcd5bdcb
2018-01-11 17:01:37 +00:00
David Kyle 999c1dab48 [ML] Remove extra quotes in field config
Original commit: elastic/x-pack-elasticsearch@d9a7ca5ebf
2018-01-11 15:57:17 +00:00
David Roberts a386b5727e [ML] Increase tokenization flexibility for categorization (elastic/x-pack-elasticsearch#3372)
By moving tokenization for categorization to Java we give users access to considerably more options for tokenizing their log messages prior to using ML to categorize them. Now all Elasticsearch analyzer functionality is available, which opens up the possibility to sensibly categorize non-English log messages.

Relates elastic/machine-learning-cpp#491

Original commit: elastic/x-pack-elasticsearch@5d61b67614
2018-01-11 15:40:13 +00:00
Alexander Reelsen 992a7af126 Watcher: Add support for actions in slack attachments (elastic/x-pack-elasticsearch#3355)
In order to support buttons that can be clicked on within a slack
message, this commits adds support for so called actions within
attachments. This allows to create buttons, that are clicked and execute
a GET request, so actions must be idempotent according to the official
slack documentation.

Official slack documentation is available at
https://api.slack.com/docs/message-attachments#action_fields

Original commit: elastic/x-pack-elasticsearch@29ddc90b01
2018-01-11 11:43:24 +01:00
Albert Zaharovits 3fc17ab918 Audit Event ignore policy (elastic/x-pack-elasticsearch#3005)
This commit introduces audit event filtering policies for the logging audit.
Until now the only way to temper the gush of audit events was to specifically
pick some event types that were reported.
This superposes a way (named policies) to filter events using lucene regexp filters on 
the following event fields: users, realms, roles and indices. The policies are ignore
policies, ie when an event matches it is ignored (not reported).

Original commit: elastic/x-pack-elasticsearch@233f685121
2018-01-11 11:07:46 +02:00
Chris Earle e74f90eba0 [Monitoring] Add Cluster Alert for Nodes Changed (elastic/x-pack-elasticsearch#3504)
This creates a cluster alert that triggers whenever a node is:

- Added
- Removed
- Restarted (aka Removed and Added between collections)

Unlike all previous cluster alerts, this cluster is always instantly resolved because there is no way to otherwise resolve it later (especially if nodes are replaced).

This will require a small change to the UI so that it does not simply ignore resolved alerts.

Original commit: elastic/x-pack-elasticsearch@6340bf7960
2018-01-10 21:29:00 -05:00
Igor Motov ce81a34467 SQL: Add jdbc mode to REST API (elastic/x-pack-elasticsearch#3499)
Adds a mode parameter to all SQL-related requests. The mode parameter is used for license checks as well as to define the response content. For now only two modes are supported plain (default) and jdbc. We will add other modes in the future as we add more clients.

Relates elastic/x-pack-elasticsearch#3419 

Original commit: elastic/x-pack-elasticsearch@b49ca38d4b
2018-01-10 09:41:36 -05:00
David Kyle 4c973c16c2 [ML] Rename event filter params (elastic/x-pack-elasticsearch#3525)
Original commit: elastic/x-pack-elasticsearch@3089193d45
2018-01-10 14:40:32 +00:00
David Kyle d3d965c8ee [ML] Configure autodetect with scheduled events (elastic/x-pack-elasticsearch#3521)
Original commit: elastic/x-pack-elasticsearch@e51b70ec69
2018-01-10 12:02:14 +00:00
David Kyle 66b187fe17 [ML] Account for job groups membership when getting events (elastic/x-pack-elasticsearch#3473)
* Account for job groups membership when getting events

Original commit: elastic/x-pack-elasticsearch@a4185cc460
2018-01-10 11:14:09 +00:00
Dimitris Athanasiou aa25704170 [ML] Add scheduled_events field to bucket (elastic/x-pack-elasticsearch#3513)
Adds `scheduled_events` to the bucket object so
it can read the corresponding field written from the
autodetect process.

Relates elastic/x-pack-elasticsearch#3016

Original commit: elastic/x-pack-elasticsearch@3f35f867f0
2018-01-10 10:57:09 +00:00
Jay Modi cbf1427ff4 Allow license installation with TLS disabled and single-node discovery (elastic/x-pack-elasticsearch#3427)
This change allows production licenses to be installed when TLS is not enabled and the discovery
type is set to single-node.

Relates elastic/x-pack-elasticsearch#3245

Original commit: elastic/x-pack-elasticsearch@73815a3976
2018-01-09 12:32:37 -07:00
Jason Tedor 374ab447f7 Push build.snapshot to BWC builds too
We need to push this flag down to the command line for BWC builds or the
artifacts in release tests will have the wrong version (being considered
snapshots instead of non-snapshots).

Original commit: elastic/x-pack-elasticsearch@279fd02aa7
2018-01-09 12:48:48 -05:00
David Kyle f73a7803ce [ML] Delete calendar events endpoint (elastic/x-pack-elasticsearch#3388)
* Delete calendar events endpoint

Original commit: elastic/x-pack-elasticsearch@70aebfae2c
2018-01-09 11:55:36 +00:00
Yannick Welsch bd3d652901 Fix Gradle wrapper usage on Windows when building BWC (elastic/x-pack-elasticsearch#3509)
Relates elastic/x-pack-elasticsearch#3502

Original commit: elastic/x-pack-elasticsearch@de69017a4f
2018-01-09 11:58:41 +01:00
Jason Tedor e92947e1b9 Use Gradle wrapper when building BWC
This commit modifies the BWC build to invoke the Gradle wrapper. The
motivation for this is two-fold:
 - BWC versions might be dependent on a different version of Gradle than
   the current version of Gradle
 - in a follow-up we are going to need to be able to set JAVA_HOME to a
   different value than the current value of JAVA_HOME

Relates elastic/x-pack-elasticsearch#3502

Original commit: elastic/x-pack-elasticsearch@22062f635b
2018-01-08 21:47:41 -05:00
Alexander Reelsen 1d3c622746 Tests: Fix mockwebserver to parse incoming http bodies as UTF8
By not specifying a charset this used the system charset and
led to breaking tests under windows.

relates elastic/x-pack-elasticsearch#3498

Original commit: elastic/x-pack-elasticsearch@17d415ebbd
2018-01-08 18:29:22 +01:00
Alexander Reelsen f80f1dd268 Tests: Silence test under windows as it fails
Relates elastic/x-pack-elasticsearch#3498

Original commit: elastic/x-pack-elasticsearch@2dda8851e4
2018-01-08 14:37:33 +01:00
Costin Leau dab50f7b77 SQL: correct index name invocation
Original commit: elastic/x-pack-elasticsearch@cec6dd6dd9
2018-01-08 14:54:18 +02:00
Alexander Reelsen 6f2fddc5f6 Watcher: Fix encoding of UTF8 data in HttpClient (elastic/x-pack-elasticsearch#3398)
The HttpClient uses an Apache HTTP client class named StringEntity to
encode a HTTP request body. This one however assumes ISO-8859-1 as its
charset when encoding the string based body to bytes.

This commit switches to a byte array based body, then sets the content
type header and falls back to the old text/plain content type if no
content type header is specified.

relates elastic/x-pack-elasticsearch#3397

Original commit: elastic/x-pack-elasticsearch@d5a6e7f0c7
2018-01-08 09:44:07 +01:00
David Kyle 2eb3f02e40 [ML] Rename SpecialEvents -> ScheduledEvents (elastic/x-pack-elasticsearch#3485)
* Rename SpecialEvents -> ScheduledEvents


Original commit: elastic/x-pack-elasticsearch@4bfc52c435
2018-01-05 16:35:42 +00:00
David Roberts f508e14e06 [TEST] Unmute ML categorization tests
The C++ changes these rely on are now in the snapshots on s3, so these
tests will work.

Relates elastic/machine-learning-cpp#512

Original commit: elastic/x-pack-elasticsearch@cb8f7b31e8
2018-01-05 16:02:35 +00:00