# New Relic Integration
# Prerequisites
Install New Relic infrastructure monitoring agent. If you haven’t installed it yet, see New Relic documentation to install the New Relic infrastructure monitoring agent (opens new window).
# How to configure New Relic to integrate with yCrash?
# Step-1: Setup webhook notification channels:
- Go to the "Alerts & AI" menu and click on the submenu "Notification Channels".
- Now click on the "+ New notification channel" button which is on the top right side of the screen.
- Next, choose the channel type “Webhook” from the list.
Fill out the channel name and Base Url in the form.
The base URL should be the yCrash API endpoint that will listen to the NewRelic webhook notifications. Say your yCrash server’s host name is "yc-server" then the base URL will be
"https://yc-server/alert-receiver?source=newrelic".
- Now click on the "Create channel" button.
# Step-2: Setup policies/alert:
- Click on the submenu "Policies".
- Now click on the "+ New alert policy" button on the top right side of the screen.
Fill out "Alert policy name" and select Incident preference "By condition and signal" and click on the "Create alert policy" button.
Next, click on the tab "0 Notification channels".
- Click on the "Add notification channels" -> Webhook -> select yours
- Now create a condition.
- Select the product and click on the “Next, define thresholds” button.
- Next, fill the form and click on the “save condition” button.
Now based on your alert configuration, whenever NewRelic raises an alert, it will send a webhook notification to the base URL that we configured above. The base URL will read the webhook notification and invoke yc-360 script’s Action API. The Action API will collect all artifacts like GC logs, thread dumps, heap dump, netstat, etc.. from the application that is being monitored by NewRelic and transmit them to the yCrash server to analyze the data. Once the analysis is completed, it will show a new incident on the yCrash calendar dashboard page.
# Configure monitoring-tools.json file
The monitoring-tools.json
file is used to configure the custom properties for the integration with monitoring tools. Inorder to integrate yCrash with NewRelic you may want to configure the below 3 properties in monitoring-tools.json
file:
ycAgentPort - Configure the port number where your yc-360 script is listening to.
ycAgentProtocol - Protocol (http/https) that is configured for the yc-360 script.
newRelicApiKey - This is a mandatory property used to configure the NewRelic API key. If you don’t have an API key then you may want to create a new API key from the API keys page.
2
3
By default the value of ycAgentPort
will be 8085
and ycAgentProtocol
will be https
. In case if you don’t configure these properties in the monitoring-tools.json
file then the yCrash will use the default values. Here are the steps to configure monitoring-tools.json
file:
Create a
monitoring-tools.json
file and add the above 3 properties into it.Place this file in the 'upload' directory.
Here is a sample
monitoring-tools.json
file.
{
"ycAgentPort": "8080",
"ycAgentProtocol": "http",
"newRelicApiKey": "test-ABCNRAWK-VNGF0OTTQFW51NIWMH2SMC486ZB1234"
}
2
3
4
5