Skip to content

[DOC] Clarify doc-level monitor sample_documents to preserve original source fields in action templates #12452

@carmeroa

Description

@carmeroa

What do you want to do?

  • Request a change to existing documentation
  • Add new documentation
  • Report a technical problem with the documentation
  • Other

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

Metadata

Metadata

Assignees

Labels

Backlog - DEVDeveloper assigned to issue is responsible for creating PR.v3.6.0

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions