Nearly any attribute on an event (for example
SyntheticCheck) can be included in the notification resulting from a violation on a NRQL alert condition. Alert custom violation descriptions can be used to include any attribute you use in a
FACET clause in the NRQL alert condition’s query.
I think the biggest problem with meeting this use-case would be getting the
console.log(object) to show up as an attribute on the
SyntheticCheck event. However, this would make a great feature request.
For now, you could write up some instructions on how to access the
console.log in a Google doc (or some shared format) and include a URL link in the Runbook URL field of the alert condition.
As a (far more complex) alternative, you could access the Insights Event API in your script and publish your own custom event to NRDB. You could then include attributes that would show success or failure, and send along the log as its own attribute. You would then set up your NRQL alert condition to query your custom event and facet on the attribute that contains the
console.log information, then use Custom Descriptions (documentation linked above) to include that detail in any notifications that got sent out.
I hope this helps get you sorted!