Hi Anton Khokhlov
I have tried to configure it with per document monitor as well and it is working for me. I am sharing some screenshots of my configuration for reference.
Just to let you know per document monitor runs a query to individual documents that matches the alert with that query. If your intention is not to find the document ID, you can use other monitors like per query monitor.
I sharing some documents on this topic. Please go through them to understand the topic better and get help with configuration.
https://opensearch.org/docs/2.8/observing-your-data/alerting/index/
https://opensearch.org/docs/2.8/observing-your-data/alerting/monitors/#per-document-monitors
The Alerting is a plugin from OpenSearch. I will also suggest you query on OpenSearch Community on this to get better assistance.
I hope you find this information helpful.