Introduction

New Relic is a SaaS offering that focuses on performance and availability monitoring.

OpsRamp configuration

Configuration involves the following:

  1. Installing the integration.
  2. Configuring the integration.

Step 1: Install the integration

To install:

  1. Select a client from the All Clients list.
  2. Go to Setup > Integrations > Integrations.
  3. From Available Integrations, select Monitoring > New Relic.
  4. Click Install.

Step 2: Configure the integration

To configure the integration:

  1. From the API tab, provide the following:
    • Authentication: Copy Tenant Id, Token and Webhook URL for configuration. These settings are used for creating a HTTP Request template.
    • Map Attributes: Provide the mapping information for the third-party.
  2. From the Monitoring of Integration tab, click Assign Templates.
  3. From the Audit Logs, set up audit log criteria and time frame.

Configuring the map attributes

To configure the mapping attributes:

  1. Select the required OpsRamp property from the drop-down.
  2. Click Add Mapping Attributes to map attributes for the specific OpsRamp alert property.
  3. Click + to define the mappings.
  4. From Create Alert Mappings on Status, define the mappings, parsing conditions, and default values, and Save.

The following tables shows the attribute mappings.

Property Mappings
OpsRamp PropertyThird Party EntityThird Party Property
Alert subjectINCIDENTdetails
Alert descriptionINCIDENTdescription
Alert metricINCIDENTmetric
Alert stateINCIDENTseverity
Alert nameINCIDENTtargets[0].name
Alert timeINCIDENTtimestamp
Alert statusINCIDENTcurrent_state

New Relic configuration

Configuration involves:

  1. Configuring a notification channel.
  2. Defining the alert policy.

Step 1: Configure a notification channel

To configure a notification channel:

  1. Log into New Relic.
  2. Go to *Alerts > Notification Channels.
    Notification Channel

    Notification Channel

  3. From New Notification Channel, select Webhook and provide OpsRamp Webhook details:
    • Channel Name: Provide channel name
    • Base URL: Provide OpsRamp alerts webhook URL.
      Note: Replace the {clientID} with the Tenant Id from the OpsRamp configuration.
    • For example: https://{api-url}/integrations/newrelic/{clientId}/alerts
    • Custom Headers:
    • Content-Type: application/json
    • Authorization: vtoken {token}
      Note: Replace {token} with the Tenant Id from the OpsRamp configuration.
    • Provide the following payload, select Payload Type JSON, and click Create Channel.

Sample payload

{
	"description": {
		"account_id": "$ACCOUNT_ID",
		"\naccount_name": "$ACCOUNT_NAME",
		"\ncondition_id": "$CONDITION_ID",
		"\ncondition_name": "$CONDITION_NAME",
		"\ncurrent_state": "$EVENT_STATE",
		"\ndetails": "$EVENT_DETAILS",
		"\nevent_type": "$EVENT_TYPE",
		"\nincident_acknowledge_url": "<a href=$INCIDENT_URL>$INCIDENT_URL</a>",
		"\nincident_id": "$INCIDENT_ID",
		"\nincident_url": "$INCIDENT_URL",
		"\nowner": "$EVENT_OWNER",
		"\npolicy_name": "$POLICY_NAME",
		"\npolicy_url": "$POLICY_URL",
		"\nrunbook_url": "<a href=$RUNBOOK_URL>$RUNBOOK_URL</a>",
		"\nseverity": "$SEVERITY",
		"\ntargets": "$TARGETS",
		"\ntimestamp": "$TIMESTAMP"
	},
	"current_state": "$EVENT_STATE",
	"details": "$EVENT_DETAILS",
	"metric": "$POLICY_NAME",
	"severity": "$SEVERITY",
	"targets": "$TARGETS",
	"timestamp": "$TIMESTAMP"
}
Notification Payload Channel

Notification Payload Channel

Step 2: Define the alert policy

To define the alert policy:

  1. Go to Alerts > Alert Policies.
  2. Provide the name of the policy as OpsRamp_Alert_Policy and click Create Policy.
  3. Click Create a Condition, and select APM, Application Metric.
  4. Click Next and select Targets.
  5. In Select target, select all applications Moodle, php, application, collaboration.net to name a few and click Next. Note: The applications may be different for few clients, but Apdex is mandatory for all the clients.
  6. Define the threshold to trigger an alert. Note: The threshold is specific for each client.
  7. To test the process of alerting, set Apdex score below 0.98 for five minutes and click Create Condition. Note: Once the alerting is successful, reset the score to the appropriate value in Apdex threshold for the specific environment.
  8. Attach the policy to the notification channel.
  9. To attach the policy click Add notification channels, select Webhook and click Update Policy.
Attach Alert Policy to Channel

Attach Alert Policy to Channel