-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
When a watch is stored and security is enabled, we currently store metadata with the watch, as which user the watch should be run.
However we never emit this information in the watch history, so that debugging this is unnecessarily hard, as it can happen, that a watch does not return any search results in the search input, but works well when executed in kibana, because the user is logged in as an admin user.
We should extend the WatchRecord class to also contain the name of the user the watch was executed in order to ease debugging (similar to how the node id was added most recently).
This requires: changing of the watch history template to add such a field, increasing it's template number in WatcherIndexTemplateRegistryField, and adding the required code in the WatchRecord as well as storing that information in the watch execution context.