Skip to content

Watcher: Store username from execution in the watch history #31772

@spinscale

Description

@spinscale

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions