I have integrated my Gitlab with Opensearch and I have written alarms and redirected these alarms to the telegram. I have looked everywhere on the internet, including Opensearch's forum, but Per Document Monitoring still cannot pull the information in the document.
My message box is as follows.
Also tried ctx.results
{ "text": "The following alerts have been triggered:\n{{#ctx.alerts}}\n Repository: {{#sample_documents}}{{_source.repository.git_http_url}}{{/sample_documents}}\n Branch: {{#sample_documents}}{{_source.ref}}{{/sample_documents}}\n Action: {{#sample_documents}}{{_source.object_kind}}{{/sample_documents}}\n User: {{#sample_documents}}{{_source.user.username}}{{/sample_documents}}\n Stage: {{#sample_documents}}{{_source.build_stage}}{{/sample_documents}}\n Status: {{#sample_documents}}{{_source.build_status}}{{/sample_documents}}\n-----------------\n{{/ctx.alerts}}" }
I have integrated my Gitlab with Opensearch and I have written alarms and redirected these alarms to the telegram. I have looked everywhere on the internet, including Opensearch's forum, but Per Document Monitoring still cannot pull the information in the document. My message box is as follows. Also tried ctx.results
{ "text": "The following alerts have been triggered:\n{{#ctx.alerts}}\n Repository: {{#sample_documents}}{{_source.repository.git_http_url}}{{/sample_documents}}\n Branch: {{#sample_documents}}{{_source.ref}}{{/sample_documents}}\n Action: {{#sample_documents}}{{_source.object_kind}}{{/sample_documents}}\n User: {{#sample_documents}}{{_source.user.username}}{{/sample_documents}}\n Stage: {{#sample_documents}}{{_source.build_stage}}{{/sample_documents}}\n Status: {{#sample_documents}}{{_source.build_status}}{{/sample_documents}}\n-----------------\n{{/ctx.alerts}}" }
Output of telegram![image](https://github.com/opensearch-project/alerting/assets/140180359/f1d18bc5-a3d2-4c55-bb65-250dbdb7940b)