{"_id":"55fa4a1aaba81f0d00a115e3","initVersion":{"_id":"55d3b644f77e6d0d00b1b273","version":"1.1"},"__v":0,"project":"55c505b41469ad2500fa2ab7","tags":[],"user":{"_id":"55d3eb3196dc260d00cdba70","username":"","name":"Satish Talluri"},"createdAt":"2015-09-17T05:05:30.098Z","changelog":[],"body":"This tutorial will help you setup a Neptune rule to troubleshoot and fix your disk space alerts.  We have taken NewRelic monitoring tool as an example below, but you can use disk space alert from any other monitoring tool.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"You have to integrate your monitoring tool or alerting tool with Neptune. It takes only 2 min. Please refer to [NewRelic](doc:newrelic-integration) integration guide\",\n  \"title\": \"Pre-requisite\"\n}\n[/block]\n## Step1 : Go to create rule page in Neptune\n* In the trigger section, select your monitoring tool\n* Neptune will pull all your alarms currently configured in monitoring tool\n* Search for your disk space alarm and select the alarm\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/TOa0UF7vRo6YfJMSbVl3_Screen%20Shot%202015-09-16%20at%209.44.11%20PM.png\",\n        \"Screen Shot 2015-09-16 at 9.44.11 PM.png\",\n        \"918\",\n        \"504\",\n        \"#fc0806\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n## Step 2 : Now in the action section\n* Select the action target - your cloud provider or on-premise\n* Select where you want to run the action - on the trigger host that generated the alarm or a totally different host.\n* Select Execute_script action, to execute a runbook of commands when the alert triggers\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/J0tIqxnTEuESYYMCh3bA_Screen%20Shot%202015-09-16%20at%209.45.38%20PM.png\",\n        \"Screen Shot 2015-09-16 at 9.45.38 PM.png\",\n        \"840\",\n        \"512\",\n        \"#fc0404\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n## Step 3 : Select a runbook template to deal with a disk alert\nNeptune open sourced a set of public runbooks to deal with most commonly occurring alerts including disk space alerts. You can start with them and customize per your own needs. Simply type \"diskspace\" in the dropdown list and you can select the public runbook to load it. \n\n* Runbook content :  For disk space alert, typically you might want to remove unnecessary logs or archive important logs to an S3 bucket. If you want to deal with disk space alert in a different way, write your own shell commands for the same.\n\n* Private github repo : In case you want to store  your customized runbook in your own private github repo refer to [Private Github runbooks](doc:private-github-runbooks) section.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/JPPk4OaiQSeDuEsp8z6r_Screen%20Shot%202015-09-16%20at%209.59.37%20PM.png\",\n        \"Screen Shot 2015-09-16 at 9.59.37 PM.png\",\n        \"1136\",\n        \"486\",\n        \"#3c73d2\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"You need a Neptune agent running on the machine to execute a script. So, go ahead and install agent by following [Agent Installation Guide](doc:agent-installation)\",\n  \"title\": \"Pre-requisite for Execute_script action\"\n}\n[/block]\n## Step 4 : Give a runbook name\nIf you don't have a private github repo, you can save the runbook on Neptune by clicking 'save runbook' and giving it a name.\n \n## Step 5 : Test your script by doing a dry run \nSelect a host and do a dry run. This will actually execute the runbook you just wrote on the machine you selected.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/5b5JRQT4TCiDAS6RBrby_Screen%20Shot%202015-09-16%20at%2010.00.53%20PM.png\",\n        \"Screen Shot 2015-09-16 at 10.00.53 PM.png\",\n        \"1136\",\n        \"488\",\n        \"#cc3104\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n## Step 6 : Give a rule name\nOnce you are happy with all settings, give a rule name and create the rule\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/0r1xHU6TziJvgg58yNXQ_Screen%20Shot%202015-09-16%20at%2010.03.16%20PM.png\",\n        \"Screen Shot 2015-09-16 at 10.03.16 PM.png\",\n        \"921\",\n        \"97\",\n        \"#833737\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"From now on, every time a disk alert comes, your runbook will be executed  You can see the history of rule invocation and script outputs in the view rule page. Please see [Checking Rule History](doc:rule-history) for more details.\",\n  \"title\": \"All done\"\n}\n[/block]\nIf you have any further questions, please use the chat window in the lower right corner or email [us](mailto:support@neptune.io)","slug":"fix-disk-space-alerts","title":"Fix disk space alerts"}

Fix disk space alerts


This tutorial will help you setup a Neptune rule to troubleshoot and fix your disk space alerts. We have taken NewRelic monitoring tool as an example below, but you can use disk space alert from any other monitoring tool. [block:callout] { "type": "warning", "body": "You have to integrate your monitoring tool or alerting tool with Neptune. It takes only 2 min. Please refer to [NewRelic](doc:newrelic-integration) integration guide", "title": "Pre-requisite" } [/block] ## Step1 : Go to create rule page in Neptune * In the trigger section, select your monitoring tool * Neptune will pull all your alarms currently configured in monitoring tool * Search for your disk space alarm and select the alarm [block:image] { "images": [ { "image": [ "https://files.readme.io/TOa0UF7vRo6YfJMSbVl3_Screen%20Shot%202015-09-16%20at%209.44.11%20PM.png", "Screen Shot 2015-09-16 at 9.44.11 PM.png", "918", "504", "#fc0806", "" ] } ] } [/block] ## Step 2 : Now in the action section * Select the action target - your cloud provider or on-premise * Select where you want to run the action - on the trigger host that generated the alarm or a totally different host. * Select Execute_script action, to execute a runbook of commands when the alert triggers [block:image] { "images": [ { "image": [ "https://files.readme.io/J0tIqxnTEuESYYMCh3bA_Screen%20Shot%202015-09-16%20at%209.45.38%20PM.png", "Screen Shot 2015-09-16 at 9.45.38 PM.png", "840", "512", "#fc0404", "" ] } ] } [/block] ## Step 3 : Select a runbook template to deal with a disk alert Neptune open sourced a set of public runbooks to deal with most commonly occurring alerts including disk space alerts. You can start with them and customize per your own needs. Simply type "diskspace" in the dropdown list and you can select the public runbook to load it. * Runbook content : For disk space alert, typically you might want to remove unnecessary logs or archive important logs to an S3 bucket. If you want to deal with disk space alert in a different way, write your own shell commands for the same. * Private github repo : In case you want to store your customized runbook in your own private github repo refer to [Private Github runbooks](doc:private-github-runbooks) section. [block:image] { "images": [ { "image": [ "https://files.readme.io/JPPk4OaiQSeDuEsp8z6r_Screen%20Shot%202015-09-16%20at%209.59.37%20PM.png", "Screen Shot 2015-09-16 at 9.59.37 PM.png", "1136", "486", "#3c73d2", "" ] } ] } [/block] [block:callout] { "type": "warning", "body": "You need a Neptune agent running on the machine to execute a script. So, go ahead and install agent by following [Agent Installation Guide](doc:agent-installation)", "title": "Pre-requisite for Execute_script action" } [/block] ## Step 4 : Give a runbook name If you don't have a private github repo, you can save the runbook on Neptune by clicking 'save runbook' and giving it a name. ## Step 5 : Test your script by doing a dry run Select a host and do a dry run. This will actually execute the runbook you just wrote on the machine you selected. [block:image] { "images": [ { "image": [ "https://files.readme.io/5b5JRQT4TCiDAS6RBrby_Screen%20Shot%202015-09-16%20at%2010.00.53%20PM.png", "Screen Shot 2015-09-16 at 10.00.53 PM.png", "1136", "488", "#cc3104", "" ] } ] } [/block] ## Step 6 : Give a rule name Once you are happy with all settings, give a rule name and create the rule [block:image] { "images": [ { "image": [ "https://files.readme.io/0r1xHU6TziJvgg58yNXQ_Screen%20Shot%202015-09-16%20at%2010.03.16%20PM.png", "Screen Shot 2015-09-16 at 10.03.16 PM.png", "921", "97", "#833737", "" ] } ] } [/block] [block:callout] { "type": "success", "body": "From now on, every time a disk alert comes, your runbook will be executed You can see the history of rule invocation and script outputs in the view rule page. Please see [Checking Rule History](doc:rule-history) for more details.", "title": "All done" } [/block] If you have any further questions, please use the chat window in the lower right corner or email [us](mailto:support@neptune.io)