Spec-Zone.ru › Elasticsearch 8
›Elasticsearch Guide [8.17] ›Troubleshooting

Troubleshooting Watcher

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:

resp = client.indices.get_mapping(
    index=".watches",
)
print(resp)
response = client.indices.get_mapping(
  index: '.watches'
)
puts response
const response = await client.indices.getMapping({
  index: ".watches",
});
console.log(response);
GET .watches/_mapping

If the index mappings are missing, follow these steps to restore the correct mappings:

  1. Stop the Elasticsearch node.
  2. Add xpack.watcher.index.rest.direct_access : true to elasticsearch.yml.
  3. Restart the Elasticsearch node.
  4. Delete the .watches index:

    resp = client.indices.delete(
        index=".watches",
    )
    print(resp)
    response = client.indices.delete(
      index: '.watches'
    )
    puts response
    const response = await client.indices.delete({
      index: ".watches",
    });
    console.log(response);
    DELETE .watches
  5. Disable direct access to the .watches index:

    1. Stop the Elasticsearch node.
    2. Remove xpack.watcher.index.rest.direct_access : true from elasticsearch.yml.
    3. Restart the Elasticsearch node.

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 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: Sign in using App Passwords
  • Outlook.com: App passwords and two-step verification

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 process watches until the bad watches time out.

© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-troubleshooting.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API