{"__v":13,"_id":"56fac9bc5df15a20002972a3","category":{"project":"55c505b41469ad2500fa2ab7","version":"55d3b644f77e6d0d00b1b273","_id":"56fac9925df15a20002972a2","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-03-29T18:29:38.389Z","from_sync":false,"order":10,"slug":"logging-tool-integrations","title":"Logging Tool Integrations"},"parentDoc":null,"project":"55c505b41469ad2500fa2ab7","user":"55c50f4a7c199a2f00665cbf","version":{"__v":6,"_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","58e52a180ab7b03b00f4a97a"],"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":"2016-03-29T18:30:20.199Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"**How it works : **\n1. You add your Papertrail API key in the integration page in Neptune\n2. Add the given Neptune endpoint as webhook to all your Papertrail saved searches\n3. Create rules in Neptune to automate all Papertrail alerts\n\n**Benefits :** Once integrated, Neptune can understand your Papertrail alerts with deeper knowledge about type of alert, log source, host, Dyno name if it is a Heroku app, etc. You can then automate all your Papertrail alerts with one click. For e.g :\n\n* Restart Heroku dyno (only) whenever it sees \"Memory quota exceeded\" errors. Very common on Heroku.\n* Restart Heroku app in response to any Heroku platform errors.\n* Scale up/down your #dynos based on some log patterns.\n* Scale up/down Sidekiq workers based on log patterns.\n\n## Step 1: Go to your integrations page to get started with Papertrail integration.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/vRZoAjq6QSKlQ8WSwB8S_Screen%20Shot%202016-03-29%20at%2011.56.23%20AM.png\",\n        \"Screen Shot 2016-03-29 at 11.56.23 AM.png\",\n        \"1914\",\n        \"956\",\n        \"#750945\",\n        \"\"\n      ],\n      \"caption\": \"Papertrail Integration\"\n    }\n  ]\n}\n[/block]\n## Step 2: Get Papertrail API token from Papertrail app settings\nIn Papertrail, go to (1) Settings --> (2) Profile --> (3) Copy api token\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/VM3lhp2WQi6ljWjJgiUA_papertrailAPItoken.png\",\n        \"papertrailAPItoken.png\",\n        \"1224\",\n        \"708\",\n        \"#cc4f3a\",\n        \"\"\n      ],\n      \"caption\": \"Get Papertrail API Token\"\n    }\n  ]\n}\n[/block]\n## Step 3: Add the Papertrail API token in Neptune integration page of Step#1\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/AwhTICfxQJGZau6sd4wa_Screen%20Shot%202016-03-29%20at%2012.27.31%20PM.png\",\n        \"Screen Shot 2016-03-29 at 12.27.31 PM.png\",\n        \"1901\",\n        \"376\",\n        \"#3d0524\",\n        \"\"\n      ],\n      \"caption\": \"Add Papertrail API token\"\n    }\n  ]\n}\n[/block]\n## Step 4: Add Neptune endpoint as a webhook in Papertrail saved search alerts\n\n  * Use the Neptune endpoint URL specified in the integration page (It contains a unique URL with your Neptune API key)\n  * In your papertrail dashboard (1) Edit a saved search --> (2) Click Create Alert --> (3) Select webhook alert channel and add the above URL\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/yMK6sCSxRTKCy3X9R5T9_papertrailAlertEdit.png\",\n        \"papertrailAlertEdit.png\",\n        \"1061\",\n        \"606\",\n        \"#c65144\",\n        \"\"\n      ],\n      \"caption\": \"Add Neptune webhook in Papertrail\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/BWB77HJXQ7yEVThlqwVN_papertrailWebhookAlert.png\",\n        \"papertrailWebhookAlert.png\",\n        \"1062\",\n        \"699\",\n        \"#3c9ede\",\n        \"\"\n      ],\n      \"caption\": \"Add Neptune webhook in Papertrail\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/9qIX2hPAT8qY7vAtCkNI_papertrailAddWebook.png\",\n        \"papertrailAddWebook.png\",\n        \"1063\",\n        \"709\",\n        \"#a95846\",\n        \"\"\n      ],\n      \"caption\": \"Add Neptune webhook in Papertrail\"\n    }\n  ]\n}\n[/block]\n * Repeat the above steps for all your saved searches where you have alerts setup.\n\nAll Done ! Now you can start creating rules in Neptune for your alerts from Papertrail.","excerpt":"","slug":"papertrail","type":"basic","title":"Papertrail"}
**How it works : ** 1. You add your Papertrail API key in the integration page in Neptune 2. Add the given Neptune endpoint as webhook to all your Papertrail saved searches 3. Create rules in Neptune to automate all Papertrail alerts **Benefits :** Once integrated, Neptune can understand your Papertrail alerts with deeper knowledge about type of alert, log source, host, Dyno name if it is a Heroku app, etc. You can then automate all your Papertrail alerts with one click. For e.g : * Restart Heroku dyno (only) whenever it sees "Memory quota exceeded" errors. Very common on Heroku. * Restart Heroku app in response to any Heroku platform errors. * Scale up/down your #dynos based on some log patterns. * Scale up/down Sidekiq workers based on log patterns. ## Step 1: Go to your integrations page to get started with Papertrail integration. [block:image] { "images": [ { "image": [ "https://files.readme.io/vRZoAjq6QSKlQ8WSwB8S_Screen%20Shot%202016-03-29%20at%2011.56.23%20AM.png", "Screen Shot 2016-03-29 at 11.56.23 AM.png", "1914", "956", "#750945", "" ], "caption": "Papertrail Integration" } ] } [/block] ## Step 2: Get Papertrail API token from Papertrail app settings In Papertrail, go to (1) Settings --> (2) Profile --> (3) Copy api token [block:image] { "images": [ { "image": [ "https://files.readme.io/VM3lhp2WQi6ljWjJgiUA_papertrailAPItoken.png", "papertrailAPItoken.png", "1224", "708", "#cc4f3a", "" ], "caption": "Get Papertrail API Token" } ] } [/block] ## Step 3: Add the Papertrail API token in Neptune integration page of Step#1 [block:image] { "images": [ { "image": [ "https://files.readme.io/AwhTICfxQJGZau6sd4wa_Screen%20Shot%202016-03-29%20at%2012.27.31%20PM.png", "Screen Shot 2016-03-29 at 12.27.31 PM.png", "1901", "376", "#3d0524", "" ], "caption": "Add Papertrail API token" } ] } [/block] ## Step 4: Add Neptune endpoint as a webhook in Papertrail saved search alerts * Use the Neptune endpoint URL specified in the integration page (It contains a unique URL with your Neptune API key) * In your papertrail dashboard (1) Edit a saved search --> (2) Click Create Alert --> (3) Select webhook alert channel and add the above URL [block:image] { "images": [ { "image": [ "https://files.readme.io/yMK6sCSxRTKCy3X9R5T9_papertrailAlertEdit.png", "papertrailAlertEdit.png", "1061", "606", "#c65144", "" ], "caption": "Add Neptune webhook in Papertrail" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/BWB77HJXQ7yEVThlqwVN_papertrailWebhookAlert.png", "papertrailWebhookAlert.png", "1062", "699", "#3c9ede", "" ], "caption": "Add Neptune webhook in Papertrail" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/9qIX2hPAT8qY7vAtCkNI_papertrailAddWebook.png", "papertrailAddWebook.png", "1063", "709", "#a95846", "" ], "caption": "Add Neptune webhook in Papertrail" } ] } [/block] * Repeat the above steps for all your saved searches where you have alerts setup. All Done ! Now you can start creating rules in Neptune for your alerts from Papertrail.