Skip to content

[BUG] Create Monitor API must clean up monitor and fail the request when indexing doc level queries step fails #897

Closed
@eirsep

Description

@eirsep

What is the bug?
When creating a monitor, we first create a new monitor and index the document for it.
Following that, we check if the monitor is a document level monitor and try index document level queries in percolate search query index.
If the indexing fails we throw an exception and the request fails, but the monitor which has been created is not deleted.
This causes users of alerting plugin and plugins using alerting plugin to conclude that monitor creation has failed but there exists a monitor unknown to users, upstream plugins which fails on every single execution due to the same failure of indexing doc level queries

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions