{"id":31,"date":"2011-04-17T09:46:00","date_gmt":"2011-04-17T09:46:00","guid":{"rendered":"http:\/\/mattdturner.com\/wordpress\/?p=31"},"modified":"2011-04-26T14:34:26","modified_gmt":"2011-04-26T20:34:26","slug":"cluster-status-check-script","status":"publish","type":"post","link":"http:\/\/mattdturner.com\/wordpress\/2011\/04\/cluster-status-check-script\/","title":{"rendered":"Cluster Status Check Script"},"content":{"rendered":"<p><span style=\"line-height: 24px;\"><span style=\"font-family: inherit;\">Lets face it, nodes randomly go down without warning sometimes. If you\u2019re like me, you aren\u2019t going to consistently check the node status throughout the day. There have been cases where a node has gone down, and I didn\u2019t know about it for a week.<\/span><\/span><br \/>\n<span style=\"line-height: 24px;\"><span style=\"font-family: inherit;\"><br \/>\n<\/span><\/span><br \/>\n<span style=\"line-height: 24px;\"><span style=\"font-family: inherit;\">This is very problematic, especially when you run a system that has a small number of nodes that are always in use.<\/span><\/span><\/p>\n<p>In an effort to resolve both the problem of me not knowing there is a dead node without requiring me to check the node status multiple times a day, I developed a python script to check if there is a dead node. The script is set to run every day at midnight, and if there is a dead node it will send me an email.<br \/>\n<span style=\"line-height: 24px;\"><span style=\"font-family: inherit;\"><br \/>\n<\/span><\/span><br \/>\n<span style=\"line-height: 24px;\"><span style=\"font-family: inherit;\"><strong>Download the script <a href=\"http:\/\/www.mattdturner.com\/resources\/cluster_status.py\">here<\/a>.<\/strong><\/span><\/span><br \/>\n<span style=\"line-height: 24px;\"><span style=\"font-family: inherit;\"><strong><br \/>\n<\/strong><\/span><\/span><br \/>\n<span style=\"line-height: 24px;\"><strong><span style=\"font-family: inherit;\"><span style=\"font-weight: normal;\">The only edits you should have to make in order to get the script to run on your system are lines 21 &#8211; 35.<\/span><\/span><\/strong><\/span><\/p>\n<ul class=\"disc\" style=\"list-style-type: disc;\">\n<li><span style=\"font-family: inherit;\">Line 21: Change to match your username<\/span><\/li>\n<li><span style=\"font-family: inherit;\">Line 22: Change to match your email address.<\/span><\/li>\n<li><span style=\"font-family: inherit;\">Lines 25-35: Change to whatever email message you want sent.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-family: inherit;\">Now all you have to do is add the script to cron.<\/span><\/p>\n<p>And you\u2019re done!<\/p>\n<div class=\"zemanta-pixie\" style=\"margin-top: 10px; height: 15px;\"><a class=\"zemanta-pixie-a\" title=\"Enhanced by Zemanta\" href=\"http:\/\/www.zemanta.com\/\"><img decoding=\"async\" class=\"zemanta-pixie-img\" style=\"border: none; float: right;\" src=\"http:\/\/img.zemanta.com\/zemified_e.png?x-id=55b3c347-ef0c-4ebf-8cea-5c12605c2688\" alt=\"Enhanced by Zemanta\" \/><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Lets face it, nodes randomly go down without warning sometimes. If you\u2019re like me, you aren\u2019t going to consistently check the node status throughout the day. There have been cases where a node has gone down, and I didn\u2019t know about it for a week. This is very problematic, especially when you run a system [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[3,88],"tags":[94,96,80,25,95],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","category-command-line","category-system-admin","tag-cluster","tag-programming","tag-python","tag-script","tag-system-admin-2","no-thumb"],"_links":{"self":[{"href":"http:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/posts\/31"}],"collection":[{"href":"http:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":3,"href":"http:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/posts\/31\/revisions"}],"predecessor-version":[{"id":90,"href":"http:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/posts\/31\/revisions\/90"}],"wp:attachment":[{"href":"http:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/media?parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/categories?post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mattdturner.com\/wordpress\/wp-json\/wp\/v2\/tags?post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}