{"id":19116,"date":"2016-01-06T10:34:19","date_gmt":"2016-01-06T02:34:19","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2016\/01\/06\/%e4%bf%ae%e6%ad%a3-cacti-monitor-module-%e7%84%a1%e6%b3%95%e9%a1%af%e7%a4%ba%e6%ad%a3%e7%a2%ba%e7%9a%84%e5%81%b5%e6%b8%ac%e5%a4%b1%e6%95%97%e6%99%82%e9%96%93\/"},"modified":"2021-03-18T17:24:39","modified_gmt":"2021-03-18T09:24:39","slug":"%e4%bf%ae%e6%ad%a3-cacti-monitor-module-%e7%84%a1%e6%b3%95%e9%a1%af%e7%a4%ba%e6%ad%a3%e7%a2%ba%e7%9a%84%e5%81%b5%e6%b8%ac%e5%a4%b1%e6%95%97%e6%99%82%e9%96%93","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/25793\/2016\/01\/06\/%e4%bf%ae%e6%ad%a3-cacti-monitor-module-%e7%84%a1%e6%b3%95%e9%a1%af%e7%a4%ba%e6%ad%a3%e7%a2%ba%e7%9a%84%e5%81%b5%e6%b8%ac%e5%a4%b1%e6%95%97%e6%99%82%e9%96%93\/","title":{"rendered":"\u4fee\u6b63 Cacti Monitor Module \u7121\u6cd5\u986f\u793a\u6b63\u78ba\u7684\u5075\u6e2c\u5931\u6557\u6642\u9593"},"content":{"rendered":"<p>\u5b89\u88dd\u5b8c Cacti \u7684 Monitor Module \u5f8c\u767c\u73fe\u7121\u6cd5\u986f\u793a\u6b63\u78ba\u7684\u5075\u6e2c\u5931\u6557\u6642\u9593<br \/><a id=\"res_3411935\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-3411935.png\"><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-3411935.png\" border=\"0\" alt=\"\" \/><\/a><\/p>\n<p>\u986f\u793a\u7684\u65e5\u671f\u53ca\u6642\u9593\u90fd\u662f 0000-00-00 00:00:00[@more@]\u5e95\u4e0b\u6587\u7ae0\u53c3\u8003\uff1a<a href=\"http:\/\/forums.cacti.net\/viewtopic.php?f=14&amp;t=48424\" target=\"_blank\" rel=\"noopener noreferrer\">Cacti \u2022 View topic &#8211; [SOLVED] Monitor v1.3-1 plugin &#8211; last fail not working<\/a><\/p>\n<p>OS\uff1aDebian 8<\/p>\n<p>1. \u5148\u627e\u5230 functions.php<br \/># <span style=\"color: #ff0000\">locate functions.php<\/span><br \/><span style=\"color: #0000ff\">\/usr\/share\/cacti\/site\/lib\/functions.php<\/span><\/p>\n<p>CentOS<br \/><span style=\"color: #0000ff\">\/usr\/share\/cacti\/lib\/functions.php<\/span><\/p>\n<p>2. \u5148\u5099\u4efd\u539f\u6a94<br \/># <span style=\"color: #ff0000\">cp \/usr\/share\/cacti\/site\/lib\/functions.php \/usr\/share\/cacti\/site\/lib\/functions.php.$(date +%F)<\/span><\/p>\n<p>3. \u9032\u884c\u4fee\u6539<br \/># <span style=\"color: #ff0000\">vim \/usr\/share\/cacti\/site\/lib\/functions.php<\/span><br \/>\u628a<br \/><span style=\"color: #0000ff\">$hosts[$host_id][&#8220;status_fail_date&#8221;] = &#8216;0000-00-00 00:00:00&#8217;;<\/span><br \/><span style=\"color: #0000ff\">$hosts[$host_id][&#8220;status_rec_date&#8221;] = &#8216;0000-00-00 00:00:00&#8217;;<\/span><br \/>\u4fee\u6539\u6210<br \/><span style=\"color: #ff0000\">if ($hosts[$host_id][&#8220;status_fail_date&#8221;] == &#8220;&#8221;){<\/span><br \/><span style=\"color: #ff0000\"><span style=\"color: #0000ff\">$hosts[$host_id][&#8220;status_fail_date&#8221;] = &#8216;0000-00-00 00:00:00&#8217;;<\/span>}<\/span><br \/><span style=\"color: #ff0000\"> if ($hosts[$host_id][&#8220;status_rec_date&#8221;] == &#8220;&#8221;){<\/span><br \/><span style=\"color: #ff0000\"><span style=\"color: #0000ff\">$hosts[$host_id][&#8220;status_rec_date&#8221;] = &#8216;0000-00-00 00:00:00&#8217;;<\/span>}<\/span><\/p>\n<p>\u4e4b\u5f8c\u5c31\u53ef\u4ee5\u6b63\u5e38\u986f\u793a\u4e86\uff01<br \/><a id=\"res_3411938\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-3411938.png\"><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-3411938.png\" border=\"0\" alt=\"\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88dd\u5b8c Cacti \u7684 Monitor Module \u5f8c\u767c\u73fe\u7121\u6cd5\u986f\u793a\u6b63\u78ba\u7684\u5075\u6e2c\u5931\u6557\u6642\u9593 \u986f\u793a\u7684\u65e5\u671f\u53ca\u6642\u9593\u90fd\u662f &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2016\/01\/06\/%e4%bf%ae%e6%ad%a3-cacti-monitor-module-%e7%84%a1%e6%b3%95%e9%a1%af%e7%a4%ba%e6%ad%a3%e7%a2%ba%e7%9a%84%e5%81%b5%e6%b8%ac%e5%a4%b1%e6%95%97%e6%99%82%e9%96%93\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008\u4fee\u6b63 Cacti Monitor Module \u7121\u6cd5\u986f\u793a\u6b63\u78ba\u7684\u5075\u6e2c\u5931\u6557\u6642\u9593\u3009<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[125,179],"tags":[],"class_list":["post-19116","post","type-post","status-publish","format-standard","hentry","category-c-78470","category-c-87877"],"meta_key":{"_pingme":["1"],"_encloseme":["1"],"lt_post_id":["622892"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19116"}],"collection":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/comments?post=19116"}],"version-history":[{"count":1,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19116\/revisions"}],"predecessor-version":[{"id":20690,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19116\/revisions\/20690"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=19116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=19116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=19116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}