# Triggers for anomaly detection

**URL:** <https://forum.opensearch.org/t/triggers-for-anomaly-detection/19668>\
**Category:** Alerting\
**Tags:** anomaly-detection\
**Created:** [June 3, 2024, 5:51am UTC](https://forum.opensearch.org/t/triggers-for-anomaly-detection/19668 "2024-06-03T05:51:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanzilanoor](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@tanzilanoor](https://forum.opensearch.org/u/tanzilanoor)\
**Post date:** [June 3, 2024, 5:51am UTC](https://forum.opensearch.org/t/triggers-for-anomaly-detection/19668/1 "2024-06-03T05:51:33Z")

</div>

Opensearch version: 2.11.1

I have created a monitor to send alerts to my custom webhook whenever an anomaly is triggered. I am sending a json to my webhookmthat included information of the latest trigger. In my detector, I have used “client.ip.keyword” as a categorical field. Whenever there is an anomaly, it shows which client ip does it belong to. I want to include the value of this for the anomaly that is triggered in json that I am sending. For this I am witting the following message:

{  
“text”: “Monitor {{ctx.monitor.name}} just entered alert status. Please investigate the issue.”,  
“Trigger” : “{{ctx.trigger.name}}”,  
“Severity”: “{{ctx.trigger.severity}}”,  
“Period start”: “{{ctx.periodStart}}”,  
“Period end”: “{{ctx.periodEnd}}”,  
“client.ip.keyword”: “{{ctx.results[0].\_source.client.ip.keyword}}”  
}

But, in the response “client.ip.keyword” has no value.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/3/33547ea01a5b12dcca2958411d3edd97ae2ea8c1.png) [@system](https://forum.opensearch.org/u/system)\
**Post date:** [August 2, 2024, 5:51am UTC](https://forum.opensearch.org/t/triggers-for-anomaly-detection/19668/2 "2024-08-02T05:51:36Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
