{"id":2997,"date":"2014-03-02T06:27:46","date_gmt":"2014-03-02T06:27:46","guid":{"rendered":"http:\/\/blog.hmouse.tk\/?p=2997"},"modified":"2014-03-10T01:14:53","modified_gmt":"2014-03-09T17:14:53","slug":"zabbix-%e7%9f%ad%e4%bf%a1%e6%8a%a5%e8%ad%a6","status":"publish","type":"post","link":"https:\/\/www.hmouse.cn\/?p=2997","title":{"rendered":"zabbix-\u77ed\u4fe1\u62a5\u8b66"},"content":{"rendered":"<p><!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd\"><br \/>\n<html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\" xml:lang=\"en\" lang=\"en\"><br \/>\n<head><br \/>\n<title>zabbix-\u77ed\u4fe1\u62a5\u8b66<\/title><br \/>\n<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\" \/><\/p>\n<style type=\"text\/css\">\nbody{\n    margin: 0 auto;\n    font-family: Georgia, Palatino, serif;\n    color: #444444;\n    line-height: 1;\n    max-width: 960px;\n    padding: 5px;\n}\nh1, h2, h3, h4 {\n    color: #111111;\n    font-weight: 400;\n}\nh1, h2, h3, h4, h5, p {\n    margin-bottom: 16px;\n    padding: 0;\n}\nh1 {\n    font-size: 28px;\n}\nh2 {\n    font-size: 22px;\n    margin: 20px 0 6px;\n}\nh3 {\n    font-size: 21px;\n}\nh4 {\n    font-size: 18px;\n}\nh5 {\n    font-size: 16px;\n}\na {\n    color: #0099ff;\n    margin: 0;\n    padding: 0;\n    vertical-align: baseline;\n}\na:hover {\n    text-decoration: none;\n    color: #ff6600;\n}\na:visited {\n    color: purple;\n}\nul, ol {\n    padding: 0;\n    margin: 0;\n}\nli {\n    line-height: 24px;\n    margin-left: 44px;\n}\nli ul, li ul {\n    margin-left: 24px;\n}\np, ul, ol {\n    font-size: 14px;\n    line-height: 20px;\n    max-width: 540px;\n}\npre {\n    padding: 0px 24px;\n    max-width: 800px;\n    white-space: pre-wrap;\n}\ncode {\n    font-family: Consolas, Monaco, Andale Mono, monospace;\n    line-height: 1.5;\n    font-size: 13px;\n}\naside {\n    display: block;\n    float: right;\n    width: 390px;\n}\nblockquote {\n    border-left:.5em solid #eee;\n    padding: 0 2em;\n    margin-left:0;\n    max-width: 476px;\n}\nblockquote  cite {\n    font-size:14px;\n    line-height:20px;\n    color:#bfbfbf;\n}<\/p>\n<p>blockquote p {  \n    color: #666;\n    max-width: 460px;\n}\nhr {\n    width: 540px;\n    text-align: left;\n    margin: 0 auto 0 0;\n    color: #999;\n}<\/p>\n<p>button,\ninput,\nselect,\ntextarea {\n  font-size: 100%;\n  margin: 0;\n  vertical-align: baseline;\n  *vertical-align: middle;\n}\nbutton, input {\n  line-height: normal;\n  *overflow: visible;\n}\nbutton::-moz-focus-inner, input::-moz-focus-inner {\n  border: 0;\n  padding: 0;\n}\nbutton,\ninput[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n  cursor: pointer;\n  -webkit-appearance: button;\n}\ninput[type=checkbox], input[type=radio] {\n  cursor: pointer;\n}\n\/* override default chrome & firefox settings *\/\ninput:not([type=\"image\"]), textarea {\n  -webkit-box-sizing: content-box;\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n}<\/p>\n<p>input[type=\"search\"] {\n  -webkit-appearance: textfield;\n  -webkit-box-sizing: content-box;\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n}\ninput[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\nlabel,\ninput,\nselect,\ntextarea {\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 13px;\n  font-weight: normal;\n  line-height: normal;\n  margin-bottom: 18px;\n}\ninput[type=checkbox], input[type=radio] {\n  cursor: pointer;\n  margin-bottom: 0;\n}\ninput[type=text],\ninput[type=password],\ntextarea,\nselect {\n  display: inline-block;\n  width: 210px;\n  padding: 4px;\n  font-size: 13px;\n  font-weight: normal;\n  line-height: 18px;\n  height: 18px;\n  color: #808080;\n  border: 1px solid #ccc;\n  -webkit-border-radius: 3px;\n  -moz-border-radius: 3px;\n  border-radius: 3px;\n}\nselect, input[type=file] {\n  height: 27px;\n  line-height: 27px;\n}\ntextarea {\n  height: auto;\n}<\/p>\n<p>\/* grey out placeholders *\/\n:-moz-placeholder {\n  color: #bfbfbf;\n}\n::-webkit-input-placeholder {\n  color: #bfbfbf;\n}<\/p>\n<p>input[type=text],\ninput[type=password],\nselect,\ntextarea {\n  -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;\n  -moz-transition: border linear 0.2s, box-shadow linear 0.2s;\n  transition: border linear 0.2s, box-shadow linear 0.2s;\n  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);\n  -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);\n  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);\n}\ninput[type=text]:focus, input[type=password]:focus, textarea:focus {\n  outline: none;\n  border-color: rgba(82, 168, 236, 0.8);\n  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);\n  -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);\n  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);\n}<\/p>\n<p>\/* buttons *\/\nbutton {\n  display: inline-block;\n  padding: 4px 14px;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 13px;\n  line-height: 18px;\n  -webkit-border-radius: 4px;\n  -moz-border-radius: 4px;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\n  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\n  background-color: #0064cd;\n  background-repeat: repeat-x;\n  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));\n  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);\n  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);\n  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));\n  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);\n  background-image: -o-linear-gradient(top, #049cdb, #0064cd);\n  background-image: linear-gradient(top, #049cdb, #0064cd);\n  color: #fff;\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n  border: 1px solid #004b9a;\n  border-bottom-color: #003f81;\n  -webkit-transition: 0.1s linear all;\n  -moz-transition: 0.1s linear all;\n  transition: 0.1s linear all;\n  border-color: #0064cd #0064cd #003f81;\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n}\nbutton:hover {\n  color: #fff;\n  background-position: 0 -15px;\n  text-decoration: none;\n}\nbutton:active {\n  -webkit-box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\n  -moz-box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\n  box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\nbutton::-moz-focus-inner {\n  padding: 0;\n  border: 0;\n}<\/p>\n<p>\/* CSS stylesheet is based on Kevin Burke's Markdown.css project (http:\/\/kevinburke.bitbucket.org\/markdowncss) *\/\n<\/style>\n<p><\/head><br \/>\n<body><\/p>\n<p>4\u3001\u521b\u5efafetion.sh\u77ed\u4fe1\u53d1\u9001\u811a\u672c<br \/>\ncat fetion.sh<\/p>\n<h1>!\/bin\/bash<\/h1>\n<h1>$1, $2, $3 mean Recipient, Subject and Message<\/h1>\n<p>fetion_dir=\/usr\/local\/fetion<\/p>\n<p>LD<em>LIBRARY<\/em>PATH=${fetion<em>dir}\/lib ${fetion<\/em>dir}\/fetion &#8211;mobile=13534283278 &#8211;pwd=13800138000 &#8211;to=$1 &#8211;msg-type=1 &#8211;msg-utf8=&#8221;$2 $3&#8243;<\/p>\n<p>\u4fdd\u5b58\u540e\u6d4b\u8bd5\u811a\u672c:<br \/>\nchmod a+x fetion.sh<br \/>\n.\/fetion.sh 135xxxxxxxx hello world<br \/>\n\u68c0\u67e5\u624b\u673a\u662f\u5426\u6536\u5230\u6d88\u606f<br \/>\n5\u3001\u65b0\u589ezabbix\u7684Media Type<br \/>\n\u767b\u5f55\u5230zabbix\uff0c\u8fdb\u5165\u201cAdministration&#8221; >> \u201dMedia types&#8221;\uff0c\u70b9\u51fb\u53f3\u4e0a\u89d2\u201cCreate Media Type&#8221;\u3002<br \/>\nDescription\u586b&#8221;Fetion&#8221;\u6216\u5176\u5b83\u540d\u79f0\uff0cType\u9009\u62e9&#8221;Script&#8221;\uff0cScript\u586b\u201dfetion.sh&#8221;\u3002<br \/>\n\u70b9\u51fb&#8221;Save&#8221;\u4fdd\u5b58\u914d\u7f6e\u3002<\/p>\n<p>vim zabbix<em>server.conf<br \/>\nAlertScriptsPath=\/usr\/local\/zabbix\/alertscripts<br \/>\nservice zabbix<\/em>server restart<br \/>\n6\u3001\u65b0\u589ezabbix\u7684Actions\u914d\u7f6e<br \/>\n\u767b\u5f55\u5230zabbix\uff0c\u8fdb\u5165&#8221;Configation&#8221; >> &#8220;Actions&#8221;\uff0c\u70b9\u51fb\u53f3\u4e0a\u89d2&#8221;Create Actions&#8221;\u3002<br \/>\n\u8f93\u5165\u201dName&#8221;\uff0c\u5176\u5b83\u90fd\u9ed8\u8ba4<br \/>\n\u70b9\u51fb\u53f3\u4fa7\u201cAction Operations&#8221;\u4e0b\u7684&#8221;New&#8221;\u6309\u94ae\uff0c&#8221;Operation Type&#8221;\u9009\u62e9&#8221;Send message&#8221;\uff0c&#8221;Send Message to&#8221;\u9009\u62e9\u4e00\u4e2a\u6216\u591a\u4e2a\u8981\u53d1\u9001\u6d88\u606f\u7684\u7528\u6237\u7ec4\uff0c\u201dSend only to&#8221;\u9009\u62e9\u6211\u4eec\u4e4b\u524d\u65b0\u589e\u7684Fetion\u3002<br \/>\n\u70b9\u51fb&#8221;Save&#8221;\u4fdd\u5b58\u914d\u7f6e<\/p>\n<p>7\u3001zabbix\u7528\u6237\u914d\u7f6e<br \/>\n\u767b\u5f55\u5230zabbix, \u8fdb\u5165&#8221;Adimistration&#8221; >> &#8220;Users&#8221;\uff0c\u5728\u4e4b\u524d\u9009\u5b9a\u8981\u53d1\u9001\u6d88\u606f\u7684\u7ec4\u91cc\u7684Members\u680f\u4f4d\u91cc\u9009\u62e9\u4e00\u4e2a\u7528\u6237\uff0c\u4f8b\u5982\u9009\u62e9Admin\u7528\u6237\u3002<br \/>\n\u5728\u7528\u6237\u4fe1\u606f\u4fee\u6539\u754c\u9762\u6700\u4e0b\u65b9\u7684\u201dMedia&#8221;\u5904\u70b9\u51fb&#8221;Add&#8221;\u6309\u94ae\u3002<br \/>\nType\u9009\u62e9&#8221;Fetion&#8221;\uff0cSend to\u586b\u5165\u6536\u4fe1\u624b\u673a\u53f7\u7801\uff0c\u5176\u5b83\u53c2\u6570\u6309\u9700\u4fee\u6539\uff0c\u70b9\u51fbAdd\u6dfb\u52a0\u3002<br \/>\n\u70b9\u51fb&#8221;Save&#8221;\u4fdd\u5b58\u914d\u7f6e\u3002<br \/>\n\u81f3\u6b64\u914d\u7f6e\u5b8c\u6210\uff0c\u89e6\u53d1\u4e00\u4e2a\u8b66\u62a5\u8bd5\u4e0b\u624b\u673a\u662f\u5426\u6536\u5230\u8baf\u606f\u3002<\/p>\n<h6>##########################\u6ce8\u610f<\/h6>\n<p>vim zabbix_server.conf<br \/>\nAlertScriptsPath=\/usr\/local\/zabbix\/alertscripts<br \/>\n\u8fd9\u4e00\u6b65\u5fc5\u987b\u8981\u505a \u5426\u5219\u65e0\u6cd5\u53d1\u9001\u77ed\u4fe1<\/p>\n<p><\/body><br \/>\n<\/html><br \/>\n<!-- This document was created with MarkdownPad, the Markdown editor for Windows (http:\/\/markdownpad.com) --><\/p>\n","protected":false},"excerpt":{"rendered":"<p><!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd\"><br \/>\n<html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\" xml:lang=\"en\" lang=\"en\"><br \/>\n<head><br \/>\n<title>zabbix-\u77ed\u4fe1\u62a5\u8b66<\/title><br \/>\n<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=utf-8\" \/><\/p>\n<style type=\"text\/css\">\nbody{\n    margin: 0 auto;\n    font-family: Georgia, Palatino, serif;\n    color: #444444;\n    line-height: 1;\n    max-width: 960px;\n    padding: 5px;\n}\nh1, h2, h3, h4 {\n    color: #111111;\n    font-weight: 400;\n}\nh1, h2, h3, h4, h5, p {\n    margin-bottom: 16px;\n    padding: 0;\n}\nh1 {\n    font-size: 28px;\n}\nh2 {\n    font-size: 22px;\n    margin: 20px 0 6px;\n}\nh3 {\n    font-size: 21px;\n}\nh4 {\n    font-size: 18px;\n}\nh5 {\n    font-size: 16px;\n}\na {\n    color: #0099ff;\n    margin: 0;\n    padding: 0;\n    vertical-align: baseline;\n}\na:hover {\n    text-decoration: none;\n    color: #ff6600;\n}\na:visited {\n    color: purple;\n}\nul, ol {\n    padding: 0;\n    margin: 0;\n}\nli {\n    line-height: 24px;\n    margin-left: 44px;\n}\nli ul, li ul {\n    margin-left: 24px;\n}\np, ul, ol {\n    font-size: 14px;\n    line-height: 20px;\n    max-width: 540px;\n}\npre {\n    padding: 0px 24px;\n    max-width: 800px;\n    white-space: pre-wrap;\n}\ncode {\n    font-family: Consolas, Monaco, Andale Mono, monospace;\n    line-height: 1.5;\n    font-size: 13px;\n}\naside {\n    display: block;\n    float: right;\n    width: 390px;\n}\nblockquote {\n    border-left:.5em solid #eee;\n    padding: 0 2em;\n    margin-left:0;\n    max-width: 476px;\n}\nblockquote  cite {\n    font-size:14px;\n    line-height:20px;\n    color:#bfbfbf;\n}<\/p>\n<p>blockquote p {  \n    color: #666;\n    max-width: 460px;\n}\nhr {\n    width: 540px;\n    text-align: left;\n    margin: 0 auto 0 0;\n    color: #999;\n}<\/p>\n<p>button,\ninput,\nselect,\ntextarea {\n  font-size: 100%;\n  margin: 0;\n  vertical-align: baseline;\n  *vertical-align: middle;\n}\nbutton, input {\n  line-height: normal;\n  *overflow: visible;\n}\nbutton::-moz-focus-inner, input::-moz-focus-inner {\n  border: 0;\n  padding: 0;\n}\nbutton,\ninput[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n  cursor: pointer;\n  -webkit-appearance: button;\n}\ninput[type=checkbox], input[type=radio] {\n  cursor: pointer;\n}\n\/* override default chrome &#038; firefox settings *\/\ninput:not([type=\"image\"]), textarea {\n  -webkit-box-sizing: content-box;\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n}<\/p>\n<p>input[type=\"search\"] {\n  -webkit-appearance: textfield;\n  -webkit-box-sizing: content-box;\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n}\ninput[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\nlabel,\ninput,\nselect,\ntextarea {\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 13px;\n  font-weight: normal;\n  line-height: normal;\n  margin-bottom: 18px;\n}\ninput[type=checkbox], input[type=radio] {\n  cursor: pointer;\n  margin-bottom: 0;\n}\ninput[type=text],\ninput[type=password],\ntextarea,\nselect {\n  display: inline-block;\n  width: 210px;\n  padding: 4px;\n  font-size: 13px;\n  font-weight: normal;\n  line-height: 18px;\n  height: 18px;\n  color: #808080;\n  border: 1px solid #ccc;\n  -webkit-border-radius: 3px;\n  -moz-border-radius: 3px;\n  border-radius: 3px;\n}\nselect, input[type=file] {\n  height: 27px;\n  line-height: 27px;\n}\ntextarea {\n  height: auto;\n}<\/p>\n<p>\/* grey out placeholders *\/\n:-moz-placeholder {\n  color: #bfbfbf;\n}\n::-webkit-input-placeholder {\n  color: #bfbfbf;\n}<\/p>\n<p>input[type=text],\ninput[type=password],\nselect,\ntextarea {\n  -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;\n  -moz-transition: border linear 0.2s, box-shadow linear 0.2s;\n  transition: border linear 0.2s, box-shadow linear 0.2s;\n  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);\n  -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);\n  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);\n}\ninput[type=text]:focus, input[type=password]:focus, textarea:focus {\n  outline: none;\n  border-color: rgba(82, 168, 236, 0.8);\n  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);\n  -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);\n  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);\n}<\/p>\n<p>\/* buttons *\/\nbutton {\n  display: inline-block;\n  padding: 4px 14px;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 13px;\n  line-height: 18px;\n  -webkit-border-radius: 4px;\n  -moz-border-radius: 4px;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\n  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\n  background-color: #0064cd;\n  background-repeat: repeat-x;\n  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));\n  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);\n  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);\n  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));\n  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);\n  background-image: -o-linear-gradient(top, #049cdb, #0064cd);\n  background-image: linear-gradient(top, #049cdb, #0064cd);\n  color: #fff;\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n  border: 1px solid #004b9a;\n  border-bottom-color: #003f81;\n  -webkit-transition: 0.1s linear all;\n  -moz-transition: 0.1s linear all;\n  transition: 0.1s linear all;\n  border-color: #0064cd #0064cd #003f81;\n  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n}\nbutton:hover {\n  color: #fff;\n  background-position: 0 -15px;\n  text-decoration: none;\n}\nbutton:active {\n  -webkit-box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\n  -moz-box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\n  box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\nbutton::-moz-focus-inner {\n  padding: 0;\n  border: 0;\n}<\/p>\n<p>\/* CSS stylesheet is based on Kevin Burke's Markdown.css project (http:\/\/kevinburke.bitbucket.org\/markdowncss) *\/\n<\/style>\n<p><\/head><br \/>\n<body><\/p>\n<p>4\u3001\u521b\u5efafetion.sh\u77ed\u4fe1\u53d1\u9001\u811a\u672c<br \/>\ncat fetion.sh<\/p>\n<h1>!\/bin\/bash<\/h1>\n<h1>$1, $2, $3 mean Recipient, Subject and Message<\/h1>\n<p>fetion_dir=\/usr\/local\/fetion<\/p>\n<p>LD<em>LIBRARY<\/em>PATH=${fetion<em>dir}\/lib ${fetion<\/em>dir}\/fetion &#8211;mobile=13534283278 &#8211;pwd=13800138000 &#8211;to=$1 &#8211;msg-type=1 &#8211;msg-utf8=&#8221;$2 $3&#8243;<\/p>\n<p>\u4fdd\u5b58\u540e\u6d4b\u8bd5\u811a\u672c:<br \/>\nchmod a+x fetion.sh<br \/>\n.\/fetion.sh 135xxxxxxxx hello world<br \/>\n\u68c0\u67e5\u624b\u673a\u662f\u5426\u6536\u5230\u6d88\u606f<br \/>\n5\u3001\u65b0\u589ezabbix\u7684Media Type<br \/>\n\u767b\u5f55\u5230zabbix\uff0c\u8fdb\u5165\u201cAdministration&#8221; >> \u201dMedia types&#8221;\uff0c\u70b9\u51fb\u53f3\u4e0a\u89d2\u201cCreate Media Type&#8221;\u3002<br \/>\nDescription\u586b&#8221;Fetion&#8221;\u6216\u5176\u5b83\u540d\u79f0\uff0cType\u9009\u62e9&#8221;Script&#8221;\uff0cScript\u586b\u201dfetion.sh&#8221;\u3002<br \/>\n\u70b9\u51fb&#8221;Save&#8221;\u4fdd\u5b58\u914d\u7f6e\u3002<\/p>\n<p>vim zabbix<em>server.conf<br \/>\nAlertScriptsPath=\/usr\/local\/zabbix\/alertscripts<br \/>\nservice zabbix<\/em>server restart<br \/>\n6\u3001\u65b0\u589ezabbix\u7684Actions\u914d\u7f6e<br \/>\n\u767b\u5f55\u5230zabbix\uff0c\u8fdb\u5165&#8221;Configation&#8221; >> &#8220;Actions&#8221;\uff0c\u70b9\u51fb\u53f3\u4e0a\u89d2&#8221;Create Actions&#8221;\u3002<br \/>\n\u8f93\u5165\u201dName&#8221;\uff0c\u5176\u5b83\u90fd\u9ed8\u8ba4<br \/>\n\u70b9\u51fb\u53f3\u4fa7\u201cAction Operations&#8221;\u4e0b\u7684&#8221;New&#8221;\u6309\u94ae\uff0c&#8221;Operation Type&#8221;\u9009\u62e9&#8221;Send message&#8221;\uff0c&#8221;Send Message to&#8221;\u9009\u62e9\u4e00\u4e2a\u6216\u591a\u4e2a\u8981\u53d1\u9001\u6d88\u606f\u7684\u7528\u6237\u7ec4\uff0c\u201dSend only to&#8221;\u9009\u62e9\u6211\u4eec\u4e4b\u524d\u65b0\u589e\u7684Fetion\u3002<br \/>\n\u70b9\u51fb&#8221;Save&#8221;\u4fdd\u5b58\u914d\u7f6e<\/p>\n<p>7\u3001zabbix\u7528\u6237\u914d\u7f6e<br \/>\n\u767b\u5f55\u5230zabbix, \u8fdb\u5165&#8221;Adimistration&#8221; >> &#8220;Users&#8221;\uff0c\u5728\u4e4b\u524d\u9009\u5b9a\u8981\u53d1\u9001\u6d88\u606f\u7684\u7ec4\u91cc\u7684Members\u680f\u4f4d\u91cc\u9009\u62e9\u4e00\u4e2a\u7528\u6237\uff0c\u4f8b\u5982\u9009\u62e9Admin\u7528\u6237\u3002<br \/>\n\u5728\u7528\u6237\u4fe1\u606f\u4fee\u6539\u754c\u9762\u6700\u4e0b\u65b9\u7684\u201dMedia&#8221;\u5904\u70b9\u51fb&#8221;Add&#8221;\u6309\u94ae\u3002<br \/>\nType\u9009\u62e9&#8221;Fetion&#8221;\uff0cSend to\u586b\u5165\u6536\u4fe1\u624b\u673a\u53f7\u7801\uff0c\u5176\u5b83\u53c2\u6570\u6309\u9700\u4fee\u6539\uff0c\u70b9\u51fbAdd\u6dfb\u52a0\u3002<br \/>\n\u70b9\u51fb&#8221;Save&#8221;\u4fdd\u5b58\u914d\u7f6e\u3002<br \/>\n\u81f3\u6b64\u914d\u7f6e\u5b8c\u6210\uff0c\u89e6\u53d1\u4e00\u4e2a\u8b66\u62a5\u8bd5\u4e0b\u624b\u673a\u662f\u5426\u6536\u5230\u8baf\u606f\u3002<\/p>\n<h6>##########################\u6ce8\u610f<\/h6>\n<p>vim zabbix_server.conf<br \/>\nAlertScriptsPath=\/usr\/local\/zabbix\/alertscripts<br \/>\n\u8fd9\u4e00\u6b65\u5fc5\u987b\u8981\u505a \u5426\u5219\u65e0\u6cd5\u53d1\u9001\u77ed\u4fe1<\/p>\n<p><\/body><br \/>\n<\/html><br \/>\n<!-- This document was created with MarkdownPad, the Markdown editor for Windows (http:\/\/markdownpad.com) --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-2997","post","type-post","status-publish","format-standard","hentry","category-5","category-5-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/posts\/2997","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2997"}],"version-history":[{"count":2,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/posts\/2997\/revisions"}],"predecessor-version":[{"id":3117,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/posts\/2997\/revisions\/3117"}],"wp:attachment":[{"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}