Configuration in Freshservice:
Step 1:
Head to the Admin panel, scroll down to IT Operations Management, and select Monitoring Tools. If your account has more than one workspace, navigate to Admin > {Worskpace Name} > IT Operations Management > Monitoring Tools
Step 2:
You are now on the Monitoring Tools list page. Select Add monitoring tool to add a new integration.
Step 3
You will see a list of pre-configured integrations, the gateway to custom integration using webhooks, and the option to use email as a channel for alerts. Select New Relic APM.
Step 4
Get the Endpoint URL and the Auth key for New Relic APM by following the integration setup.
Configuration in New Relic APM:
In New Relic, click on Alerts > Notification channels > New Notification Channel
Select Channel type as Webhook
Set a Channel name
In the Base URL field, paste the copied Endpoint URL from Freshservice
In the Custom Headers section, enter Name as Authorization and in the Value field, paste the Auth token copied from Freshservice without the word Authorization in it.
Add another row and enter Name as Content-Type and Value as application/json
In the Use Custom Payload section, click on Add Custom Payload
New Relic displays its default payload on selecting this
In the payload type, select JSON
Click on Create Channel
Setting webhook as the notification channel for your alerts
On clicking on Create Channel, the Alert Policies tab will be displayed
Clicking on Add Policies
It will display a list of all the Alert Policies that you have previously created.
Select the Alert Policies for which you want to send alerts to Freshservice and click on Save Changes.
Click on Alerts tab > Alert Policies > Notification Channel > Open the webhook channel that you created.
Sending a sample alert to Freshservice
Please note that to send a test notification to Freshservice, the payload has to be replaced with the following
This setting has to be reset as mentioned below to send real time alerts to Freshservice.
{ "account_id": "$ACCOUNT_ID", "account_name": "$ACCOUNT_NAME", "closed_violations_count_critical": "$CLOSED_VIOLATIONS_COUNT_CRITICAL", "closed_violations_count_warning": "$CLOSED_VIOLATIONS_COUNT_WARNING", "condition_description": "$DESCRIPTION", "condition_family_id": "$CONDITION_FAMILY_ID", "condition_name": "$CONDITION_NAME", "current_state": "$EVENT_STATE", "details": "$EVENT_DETAILS", "duration": "$DURATION", "event_type": "$EVENT_TYPE", "incident_acknowledge_url": "$INCIDENT_ACKNOWLEDGE_URL", "incident_id": "$INCIDENT_ID", "incident_url": "$INCIDENT_URL", "metadata": "$METADATA", "open_violations_count_critical": "$OPEN_VIOLATIONS_COUNT_CRITICAL", "open_violations_count_warning": "$OPEN_VIOLATIONS_COUNT_WARNING", "owner": "$EVENT_OWNER", "policy_name": "$POLICY_NAME", "policy_url": "$POLICY_URL", "runbook_url": "$RUNBOOK_URL", "severity": "$SEVERITY", "targets": [ { "id": "1a5", "link": "http://localhost/target/1a5", "name": "server_1a5", "type": "Server", "labels": [ "production", "hostname" ], "product": "productName" } ], "timestamp": "$TIMESTAMP", "violation_callback_url": "$VIOLATION_CALLBACK_URL", "violation_chart_url": "$VIOLATION_CHART_URL" }
Click on Save Changes
Scroll to the bottom to find “Send a test notification” link
Click on this link to send a test notification to Freshservice to confirm that the integration is successful.
On successful creation of an alert in Freshservice, you will get this confirmation in NewRelic