28 Dec 2022 11:09 AM - last edited on 02 Jan 2023 01:56 AM by MaciejNeumann
Is it possible to include my own failure message from post-execution script (for an HTTP monitor) in the email notification (Notification profile)?
Right now, it appears only certain placeholders are available in the template body of the notification profile.
Yes, it is possible to add a custom message to the Email Notification. What I would recommend is to make sure that you have a dedicated Alerting Profile which covers those HTTP Synthetic monitoring and then customize the email notification as per your need. Here is a sample example:
Thank you Abhi. To clarify, we are aware of the Alerting and Notification profile and the different placeholders.
Our post-execution script itself outputs an error message based on reason for failure. This is what we would like to include in the email. Example, we would the email to include either of the two api.fail messages, based on reason for failure. Is it possible to include these in the email?
api.fail("Error: No response received");
api.fail("Error: Response time longer than X seconds:);
Using the web hook integration, you could achieve your desired result but would have some programming to do on an external integration system along with related email interface.
I haven't used this myself yet, but there is a new placeholder that allows you to include individual tags in your payload. I wonder if you could set a tag with the failure reason with this tag included in the email notification?