What do you want to do?
Tell us about your request.
Please clarify in the Alerting documentation how sample_documents works for doc-level monitor action templates.
sample_documents should expose the original matched document with stable _id, _index, and _source fields so Mustache templates can safely reference original document fields such as {{_source.field_name}}. The docs should also mention that nested _source objects are preserved and that this is particularly useful for routed indices.
Version:
3.6
What other resources are available?
- Alerting issue: #2149
- Related PR: #2150
- Regression tests:
alerting/src/test/kotlin/org/opensearch/alerting/transport/DocLevelMonitorSampleDocumentsTests.kt
What do you want to do?
Tell us about your request.
Please clarify in the Alerting documentation how
sample_documentsworks for doc-level monitor action templates.sample_documentsshould expose the original matched document with stable_id,_index, and_sourcefields so Mustache templates can safely reference original document fields such as{{_source.field_name}}. The docs should also mention that nested_sourceobjects are preserved and that this is particularly useful for routed indices.Version:
3.6
What other resources are available?
alerting/src/test/kotlin/org/opensearch/alerting/transport/DocLevelMonitorSampleDocumentsTests.kt