Over a million developers have joined DZone.

Sending Alerts Data to Insights

Learn how to create a dashboard that shows how many incidents have occurred for each alert policy, and which conditions triggered each incident.

· Performance Zone

Evolve your approach to Application Performance Monitoring by adopting five best practices that are outlined and explored in this e-book, brought to you in partnership with BMC.

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:

alerts insights screenshot

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):

alerts data insights screenshot

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.

recent alerts example


Learn tips and best practices for optimizing your capacity management strategy with the Market Guide for Capacity Management, brought to you in partnership with BMC.

performance ,new relic ,alerts

Published at DZone with permission of Phil Weber, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}