Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do i include message fields in the Alert Action Message for Per query monitor #1398

Closed
PradeepMurani opened this issue Feb 1, 2024 · 1 comment

Comments

@PradeepMurani
Copy link

I have built a per-query monitor in open search. This monitor includes specific data filters that are designed to activate an alert message when certain conditions are met. This monitor is fully functional and producing the expected results.
Now I would like to incorporate the message (in bold) field from the source log into the alert message. Below is the actual source log I'll be referring to.

{ "@timestamp": "2024-01-31T19:02:47.289Z", "time": "2024-01-31T19:02:47.289739655Z", "stream": "stderr", "logtag": "F", "message": "[31-Jan-2024 19:02:47] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it", "kubernetes": { "pod_name": "XXXXX", "namespace_name": "XXXX", "pod_id": "a4a8b6a5-f829-4b72-99e6-c5305920e43c", "labels": { "app": "XXXX", "pod-template-hash": "675d7d7988", "zone": "XXXX" }, "host": "XXXXXX", "container_name": "web", "docker_id": "a4a8b6a5-f829-4b72-99e6-c5305920e43c", "container_image": "XXXXXXXX" } }

I attempted to retrieve the message field using ctx.results.0, which is an array containing the query result exclusively. Unfortunately, the message field was not included in the results array.

I would be very grateful if someone could kindly provide me with an example of how to accomplish this task.

@PradeepMurani PradeepMurani closed this as not planned Won't fix, can't repro, duplicate, stale Feb 9, 2024
@PradeepMurani PradeepMurani reopened this Feb 9, 2024
@PradeepMurani PradeepMurani closed this as not planned Won't fix, can't repro, duplicate, stale Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant