As I was teaching a customer about New Relic Insights recently, she had a light bulb moment: “Ooh,” she asked, “can we use Insights to analyze Alerts data? Can we create a dashboard that shows how many incidents have occurred for each alert policy, and which conditions triggered each incident?”
Good news! It turns out you can do that, and it’s surprisingly easy to set up.
In order to get started, you’ll need the following information from your Insights account:
- An Insert Key for the Insights API
- Your New Relic account ID, which is included in the Insights events API endpoint (https://insights-collector.newrelic.com/v1/accounts/[account_id]/events)
Once you’ve assembled the necessary information, create a Webhook notification channel in Alerts. In the Base Url field, enter the Insights events API endpoint. Add a Custom Header named X-Insert-Key, and set its value to your Insights API Insert Key:
Next, customize the JSON payload that Alerts will send to Insights: add an additional field namedeventType, and specify what you'd like to call your custom Insights event (I called mine alert):
If you like, you can delete or rename attributes (the values to the left of the colons). Save your changes, and associate your new Webhook channel with one or more alert policies.
That’s it! Whenever a condition is violated on one of those policies, Alerts will post the details of the incident to Insights, where you may slice and dice it to your heart’s content.
Note: This blog post was adapted from a post in the New Relic Community Forum. Click here to see the original post and participate in the conversation.
Alert image courtesy of Shutterstock.com.
Las opiniones expresadas en este blog son las del autor y no reflejan necesariamente las opiniones de New Relic. Todas las soluciones ofrecidas por el autor son específicas del entorno y no forman parte de las soluciones comerciales o el soporte ofrecido por New Relic. Únase a nosotros exclusivamente en Explorers Hub ( discus.newrelic.com ) para preguntas y asistencia relacionada con esta publicación de blog. Este blog puede contener enlaces a contenido de sitios de terceros. Al proporcionar dichos enlaces, New Relic no adopta, garantiza, aprueba ni respalda la información, las vistas o los productos disponibles en dichos sitios.