How to access attach_related field?
See original GitHub issueNear the end of the documentation for the Frequency alert type, there is an option called attach_related
which states:
attach_related: Will attach all the related events to the event that triggered the frequency alert. For example in an alert triggered with num_events: 3, the 3rd event will trigger the alert on itself and add the other 2 events in a key named related_events that can be accessed in the alerter.
How do we access the “related_events” key in our alerter (right now we are focusing on slack alerts). Specifically, if I would like to display a list of all values of a specific field from all events that triggered the alert, is there a way to do that??
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Working with Attachment data type in Microsoft Access
In MS Access accdb Microsoft introduced a new data type called attachments. Many types of files can be stored ... Important attachment related...
Read more >Replace the Paperclip Icon of Attachment Fields with a ...
In Access 2007, 2010, 2013 and 2016 databases (ACCDBs), the Attachment field type lets you add multiple files to each record in the...
Read more >Adding an Attachment: IU Only: Files: Access: The Basics
Available Files · 1. To navigate to the last field heading in our table, · 2. To start adding a new field, at...
Read more >Access 2010: Creating Forms - GCF Global
To add a field to a form: · Select the Form Layout Tools Design tab, then locate the Tools group on the right...
Read more >Access: How to match/relate records to each other within ...
Add a new field to the table such as MainProject . Make sure it has the same data-type as the ProjectNumber field; ·...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks so much for the quick reply Qmando. This format ended up working for me was:
Like this:
If I may suggest, since there are a few threads like this floating around, the documentation for how to access that string be added to the
attach_related
docs.@jocooler Also, i just noticed on a few checks that my related event is only holding one document data irrespective of query hits being >3. Why would that happen? PFB my rule file for reference.
type: frequency num_events: 2 timeframe: minutes: 30 index: elk_test2 filter:
command: “echo %(@timestamp)s %(log_json.transaction.conversationId)s {related_events[0][log_json][transaction][conversationId]} {related_events[1][log_json][transaction][conversationId]} {related_events[2][log_json][transaction][conversationId]}>> path_to_file/command_alert.log”
Can’t figure out why!