2019-07-12 11:07:12 -04:00
|
|
|
[role="xpack"]
|
|
|
|
[testenv="gold"]
|
|
|
|
[[watcher-troubleshooting]]
|
|
|
|
== Troubleshooting {watcher}
|
|
|
|
[subs="attributes"]
|
|
|
|
++++
|
|
|
|
<titleabbrev>Troubleshooting</titleabbrev>
|
|
|
|
++++
|
|
|
|
|
|
|
|
[discrete]
|
|
|
|
=== Dynamic mapping error when trying to add a watch
|
|
|
|
|
|
|
|
If you get the _Dynamic Mapping is Disabled_ error when you try to add a watch,
|
|
|
|
verify that the index mappings for the `.watches` index are available. You can
|
|
|
|
do that by submitting the following request:
|
|
|
|
|
2019-09-09 12:35:50 -04:00
|
|
|
[source,console]
|
2019-07-12 11:07:12 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
GET .watches/_mapping
|
|
|
|
--------------------------------------------------
|
Deprecate REST access to System Indices (#63274) (Original #60945)
This PR adds deprecation warnings when accessing System Indices via the REST layer. At this time, these warnings are only enabled for Snapshot builds by default, to allow projects external to Elasticsearch additional time to adjust their access patterns.
Deprecation warnings will be triggered by all REST requests which access registered System Indices, except for purpose-specific APIs which access System Indices as an implementation detail a few specific APIs which will continue to allow access to system indices by default:
- `GET _cluster/health`
- `GET {index}/_recovery`
- `GET _cluster/allocation/explain`
- `GET _cluster/state`
- `POST _cluster/reroute`
- `GET {index}/_stats`
- `GET {index}/_segments`
- `GET {index}/_shard_stores`
- `GET _cat/[indices,aliases,health,recovery,shards,segments]`
Deprecation warnings for accessing system indices take the form:
```
this request accesses system indices: [.some_system_index], but in a future major version, direct access to system indices will be prevented by default
```
2020-10-06 15:41:40 -04:00
|
|
|
// TEST[skip:deprecation warning]
|
2019-07-12 11:07:12 -04:00
|
|
|
|
|
|
|
If the index mappings are missing, follow these steps to restore the correct
|
|
|
|
mappings:
|
|
|
|
|
|
|
|
. Stop the Elasticsearch node.
|
|
|
|
. Add `xpack.watcher.index.rest.direct_access : true` to `elasticsearch.yml`.
|
|
|
|
. Restart the Elasticsearch node.
|
|
|
|
. Delete the `.watches` index:
|
|
|
|
+
|
|
|
|
--
|
2019-09-09 12:35:50 -04:00
|
|
|
[source,console]
|
2019-07-12 11:07:12 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
DELETE .watches
|
|
|
|
--------------------------------------------------
|
Deprecate REST access to System Indices (#63274) (Original #60945)
This PR adds deprecation warnings when accessing System Indices via the REST layer. At this time, these warnings are only enabled for Snapshot builds by default, to allow projects external to Elasticsearch additional time to adjust their access patterns.
Deprecation warnings will be triggered by all REST requests which access registered System Indices, except for purpose-specific APIs which access System Indices as an implementation detail a few specific APIs which will continue to allow access to system indices by default:
- `GET _cluster/health`
- `GET {index}/_recovery`
- `GET _cluster/allocation/explain`
- `GET _cluster/state`
- `POST _cluster/reroute`
- `GET {index}/_stats`
- `GET {index}/_segments`
- `GET {index}/_shard_stores`
- `GET _cat/[indices,aliases,health,recovery,shards,segments]`
Deprecation warnings for accessing system indices take the form:
```
this request accesses system indices: [.some_system_index], but in a future major version, direct access to system indices will be prevented by default
```
2020-10-06 15:41:40 -04:00
|
|
|
// TEST[skip:index deletion and deprecation warning]
|
2019-07-12 11:07:12 -04:00
|
|
|
--
|
|
|
|
. Disable direct access to the `.watches` index:
|
|
|
|
.. Stop the Elasticsearch node.
|
|
|
|
.. Remove `xpack.watcher.index.rest.direct_access : true` from `elasticsearch.yml`.
|
|
|
|
.. Restart the Elasticsearch node.
|
|
|
|
|
|
|
|
[discrete]
|
|
|
|
=== Unable to send email
|
|
|
|
|
|
|
|
If you get an authentication error indicating that you need to continue the
|
|
|
|
sign-in process from a web browser when Watcher attempts to send email, you need
|
|
|
|
to configure Gmail to
|
|
|
|
https://support.google.com/accounts/answer/6010255?hl=en[Allow Less Secure Apps to access your account].
|
|
|
|
|
|
|
|
If you have two-step verification enabled for your email account, you must
|
|
|
|
generate and use an App Specific password to send email from {watcher}. For more
|
|
|
|
information, see:
|
|
|
|
|
|
|
|
- Gmail: https://support.google.com/accounts/answer/185833?hl=en[Sign in using App Passwords]
|
|
|
|
- Outlook.com: http://windows.microsoft.com/en-us/windows/app-passwords-two-step-verification[App passwords and two-step verification]
|
|
|
|
|
|
|
|
[discrete]
|
|
|
|
=== {watcher} not responsive
|
|
|
|
|
|
|
|
Keep in mind that there's no built-in validation of scripts that you add to a
|
|
|
|
watch. Buggy or deliberately malicious scripts can negatively impact {watcher}
|
|
|
|
performance. For example, if you add multiple watches with buggy script
|
|
|
|
conditions in a short period of time, {watcher} might be temporarily unable to
|
Deprecate REST access to System Indices (#63274) (Original #60945)
This PR adds deprecation warnings when accessing System Indices via the REST layer. At this time, these warnings are only enabled for Snapshot builds by default, to allow projects external to Elasticsearch additional time to adjust their access patterns.
Deprecation warnings will be triggered by all REST requests which access registered System Indices, except for purpose-specific APIs which access System Indices as an implementation detail a few specific APIs which will continue to allow access to system indices by default:
- `GET _cluster/health`
- `GET {index}/_recovery`
- `GET _cluster/allocation/explain`
- `GET _cluster/state`
- `POST _cluster/reroute`
- `GET {index}/_stats`
- `GET {index}/_segments`
- `GET {index}/_shard_stores`
- `GET _cat/[indices,aliases,health,recovery,shards,segments]`
Deprecation warnings for accessing system indices take the form:
```
this request accesses system indices: [.some_system_index], but in a future major version, direct access to system indices will be prevented by default
```
2020-10-06 15:41:40 -04:00
|
|
|
process watches until the bad watches time out.
|