{"__v":35,"_id":"55d3b647f77e6d0d00b1b287","category":{"__v":4,"_id":"55d3b645f77e6d0d00b1b27c","pages":["55d3b647f77e6d0d00b1b286","55d3b647f77e6d0d00b1b287","55d3b647f77e6d0d00b1b288","55d3b647f77e6d0d00b1b289","55d3b647f77e6d0d00b1b28a","55d3b647f77e6d0d00b1b28b","55d3b647f77e6d0d00b1b28c","55d3b647f77e6d0d00b1b28d","55d3b647f77e6d0d00b1b28e","55d3b647f77e6d0d00b1b28f","55d3b647f77e6d0d00b1b290","55d3b647f77e6d0d00b1b291","562ea6c53b2af20d006ad03d","56312e4024014b0d00bd9a48","564e4d122b223c2b00496a27"],"project":"55c505b41469ad2500fa2ab7","version":"55d3b644f77e6d0d00b1b273","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-08-10T18:45:23.276Z","from_sync":false,"order":9,"slug":"integration-guides","title":"Integration Guides"},"parentDoc":null,"project":"55c505b41469ad2500fa2ab7","user":"55c50f4a7c199a2f00665cbf","version":{"__v":5,"_id":"55d3b644f77e6d0d00b1b273","project":"55c505b41469ad2500fa2ab7","createdAt":"2015-08-18T22:48:36.632Z","releaseDate":"2015-08-18T22:48:36.632Z","categories":["55d3b645f77e6d0d00b1b274","55d3b645f77e6d0d00b1b275","55d3b645f77e6d0d00b1b276","55d3b645f77e6d0d00b1b277","55d3b645f77e6d0d00b1b278","55d3b645f77e6d0d00b1b279","55d3b645f77e6d0d00b1b27a","55d3b645f77e6d0d00b1b27b","55d3b645f77e6d0d00b1b27c","55d3b645f77e6d0d00b1b27d","55d7c2939510f00d007ec6fe","56fac9925df15a20002972a2","56fb2f7668e1d30e00a0b672","583498d411e8af2500f6b334"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.1.0","version":"1.1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-08-10T18:51:41.725Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"**How it works : **\n1. Add your NewRelic API key to Neptune\n2. Add a Neptune endpoint as webhook to all your alert policies in NewRelic (Don't do this step if you are a pagerduty user and have already integrated your pagerduty account with Neptune)\n\n**Benefits :** Once integrated, Neptune can understand your NewRelic alert policies and all the alerts with deeper knowledge about type of alert, trigger host, etc. You can then automate all your NewRelic alerts. For e.g :\n\n* Restart your app when NewRelic application availability alert triggers\n* Gather diagnostics about your app when high error rate alert riggers\n* Scale up/down your heroku app based on NewRelic's throughput alerts\n* Cleanup disks when high disk utilization alert triggers\n* Restart an app when high memory alert triggers\n\n## Step 1: Go to your integrations page to get started with New Relic integration \n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/9PfNUNiaRR53ac0gsKU5_newrelicGetStarted.png\",\n        \"newrelicGetStarted.png\",\n        \"1613\",\n        \"1034\",\n        \"#a71b68\",\n        \"\"\n      ],\n      \"caption\": \"NewRelic Integration\"\n    }\n  ]\n}\n[/block]\n## Step 2: Get your New Relic API key\nIn your New Relic account go to Account settings --> Datasharing page, to access your API key.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/Oupik5yzSNG5yyEo4MBV_newrelicAPIKeys.png\",\n        \"newrelicAPIKeys.png\",\n        \"1390\",\n        \"871\",\n        \"#b85357\",\n        \"\"\n      ],\n      \"caption\": \"Get NewRelic API Key\"\n    }\n  ]\n}\n[/block]\n\n## Step 3: Add New Relic API key in Neptune\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/d7ieP6zsTRSLM9uak4UT_newrelicAddAPIKeys.png\",\n        \"newrelicAddAPIKeys.png\",\n        \"898\",\n        \"359\",\n        \"#a3226a\",\n        \"\"\n      ],\n      \"caption\": \"Add NewRelic API Key\"\n    }\n  ]\n}\n[/block]\n## Step 4: Add Neptune endpoint as a webhook channel in New Relic\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Pagerduty users should NOT run this step which adds a Neptune webhook in your monitoring tool\",\n  \"body\": \"Doing so will send two alerts to Neptune, one from pagerduty and another from your monitoring tool\"\n}\n[/block]\n1. If you are not a pagerduty user, then copy the Neptune endpoint specified in the integration page (It contains a unique URL with your Neptune API key) and add it in NewRelic\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/d7YdHvmrRKOR07UHBnkz_newRelicWebhook.png\",\n        \"newRelicWebhook.png\",\n        \"892\",\n        \"69\",\n        \"#bc332b\",\n        \"\"\n      ],\n      \"caption\": \"\"\n    }\n  ]\n}\n[/block]\n2. In your New Relic account go to: APM --> Alerts --> Channels & groups --> Create channel --> Add a webhook (steps 6-10 in the picture below) for **all critical events notification**\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/YByhqLATzC78mV6BzHST_newrelicIntegration.png\",\n        \"newrelicIntegration.png\",\n        \"1576\",\n        \"1162\",\n        \"#b5242a\",\n        \"\"\n      ],\n      \"caption\": \"Create Webhook channel in NewRelic\"\n    }\n  ]\n}\n[/block]\n## Step 5: Add new webhook channel to your New Relic alert policies\nIn your New Relic account go to : APM --> Alerts --> Application policies --> {Select an alert policy} --> Alert channels --> Select channels --> Check the Neptune webhook\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/iuZaD2M6QZKhMQHhl03K_newrelicAddChannel.png\",\n        \"newrelicAddChannel.png\",\n        \"1565\",\n        \"1095\",\n        \"#be434d\",\n        \"\"\n      ],\n      \"caption\": \"\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/FWTxWjTvSfS7B6X8AHnQ_newrelicAddNeptuneChannel.png\",\n        \"newrelicAddNeptuneChannel.png\",\n        \"779\",\n        \"622\",\n        \"#3e5f73\",\n        \"\"\n      ],\n      \"caption\": \"\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Repeat step 5 above to add Neptune webhook channel to all your NewRelic alert policies\",\n  \"body\": \"Now you are done with NewRelic integration. You can go ahead and create rules to automate your NewRelic alerts\"\n}\n[/block]","excerpt":"","slug":"newrelic-integration","type":"basic","title":"NewRelic"}
**How it works : ** 1. Add your NewRelic API key to Neptune 2. Add a Neptune endpoint as webhook to all your alert policies in NewRelic (Don't do this step if you are a pagerduty user and have already integrated your pagerduty account with Neptune) **Benefits :** Once integrated, Neptune can understand your NewRelic alert policies and all the alerts with deeper knowledge about type of alert, trigger host, etc. You can then automate all your NewRelic alerts. For e.g : * Restart your app when NewRelic application availability alert triggers * Gather diagnostics about your app when high error rate alert riggers * Scale up/down your heroku app based on NewRelic's throughput alerts * Cleanup disks when high disk utilization alert triggers * Restart an app when high memory alert triggers ## Step 1: Go to your integrations page to get started with New Relic integration [block:image] { "images": [ { "image": [ "https://files.readme.io/9PfNUNiaRR53ac0gsKU5_newrelicGetStarted.png", "newrelicGetStarted.png", "1613", "1034", "#a71b68", "" ], "caption": "NewRelic Integration" } ] } [/block] ## Step 2: Get your New Relic API key In your New Relic account go to Account settings --> Datasharing page, to access your API key. [block:image] { "images": [ { "image": [ "https://files.readme.io/Oupik5yzSNG5yyEo4MBV_newrelicAPIKeys.png", "newrelicAPIKeys.png", "1390", "871", "#b85357", "" ], "caption": "Get NewRelic API Key" } ] } [/block] ## Step 3: Add New Relic API key in Neptune [block:image] { "images": [ { "image": [ "https://files.readme.io/d7ieP6zsTRSLM9uak4UT_newrelicAddAPIKeys.png", "newrelicAddAPIKeys.png", "898", "359", "#a3226a", "" ], "caption": "Add NewRelic API Key" } ] } [/block] ## Step 4: Add Neptune endpoint as a webhook channel in New Relic [block:callout] { "type": "danger", "title": "Pagerduty users should NOT run this step which adds a Neptune webhook in your monitoring tool", "body": "Doing so will send two alerts to Neptune, one from pagerduty and another from your monitoring tool" } [/block] 1. If you are not a pagerduty user, then copy the Neptune endpoint specified in the integration page (It contains a unique URL with your Neptune API key) and add it in NewRelic [block:image] { "images": [ { "image": [ "https://files.readme.io/d7YdHvmrRKOR07UHBnkz_newRelicWebhook.png", "newRelicWebhook.png", "892", "69", "#bc332b", "" ], "caption": "" } ] } [/block] 2. In your New Relic account go to: APM --> Alerts --> Channels & groups --> Create channel --> Add a webhook (steps 6-10 in the picture below) for **all critical events notification** [block:image] { "images": [ { "image": [ "https://files.readme.io/YByhqLATzC78mV6BzHST_newrelicIntegration.png", "newrelicIntegration.png", "1576", "1162", "#b5242a", "" ], "caption": "Create Webhook channel in NewRelic" } ] } [/block] ## Step 5: Add new webhook channel to your New Relic alert policies In your New Relic account go to : APM --> Alerts --> Application policies --> {Select an alert policy} --> Alert channels --> Select channels --> Check the Neptune webhook [block:image] { "images": [ { "image": [ "https://files.readme.io/iuZaD2M6QZKhMQHhl03K_newrelicAddChannel.png", "newrelicAddChannel.png", "1565", "1095", "#be434d", "" ], "caption": "" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/FWTxWjTvSfS7B6X8AHnQ_newrelicAddNeptuneChannel.png", "newrelicAddNeptuneChannel.png", "779", "622", "#3e5f73", "" ], "caption": "" } ] } [/block] [block:callout] { "type": "success", "title": "Repeat step 5 above to add Neptune webhook channel to all your NewRelic alert policies", "body": "Now you are done with NewRelic integration. You can go ahead and create rules to automate your NewRelic alerts" } [/block]