{"id":1085,"date":"2014-09-29T10:10:57","date_gmt":"2014-09-29T02:10:57","guid":{"rendered":"https:\/\/cowman-chiang.no-ip.org\/wordpress\/?p=1085"},"modified":"2023-10-31T15:46:00","modified_gmt":"2023-10-31T07:46:00","slug":"cacti-%e8%87%aa%e8%a8%82-script-php","status":"publish","type":"post","link":"https:\/\/cowmanchiang.me\/wp\/?p=1085","title":{"rendered":"Cacti \u81ea\u8a02 Script php"},"content":{"rendered":"<ol>\n<li>\u8a18\u5f97php\u6a94\u6848\u6700\u5f8creturn\u503c\u683c\u5f0f<\/li>\n<li>\n<p>\u65b0\u589e Data Input Methods &lt;== \u547c\u53ebscript php\u65b9\u6cd5<br \/>\nInput Type => Script &#8211; Script Server (PHP)<br \/>\nInput String => <path_cacti>\/scripts\/[php\u6a94\u540d] [php\u5167\u4f7f\u7528\u7684function\u540d\u7a31] \uff1chostname\uff1e [\u53c3\u6578\u503c]<br \/>\nInput Fields => hostname<br \/>\n&#8212; Special Type Code ==> hostname<br \/>\nOutput Fields => <a href=\"[\u6b04\u4f4d\u503c]\">\u6b04\u4f4d\u540d\u7a31<\/a><\/p>\n<\/li>\n<li>\n<p>\u65b0\u589eData Templates<br \/>\nData Template => Name => [Template\u7684\u540d\u7a31] \/\/VMware ESXi &#8211; HW Information &#8211; Processor_Temperature<br \/>\nData Source =><br \/>\n&#8212; Name => |host_description| &#8211; [Data Source\u7684\u540d\u7a31] \/\/|host_description| &#8211; VMware ESXi &#8211; HW Information &#8211; Processor_Temperature<br \/>\n&#8212; Data Input Method => [\u9078\u64c7\u4f7f\u7528\u7684Data Input Method]<br \/>\n&#8212; Step => [\u591a\u4e45\u57f7\u884c\u4e00\u6b21]<br \/>\n&#8212; Data Source Active => \u52fe\u9078<br \/>\nData Source Item\uff0c\u9019\u662f\u6700\u9ebb\u7169\u7684\uff0c\u4e00\u958b\u59cb\u7de8\u8f2f\u5b8c\u5148\u6309Save\uff0c\u5728\u6309New\uff0c\u6703\u51fa\u73fe\u4e00\u500bds\u7684tab\uff0c\u4fee\u6539\u70ba\u65b0\u589e\u7684\u8cc7\u8a0a\uff0c\u518d\u6309save\uff0c\u518d\u6309new&#8230;.<br \/>\n&#8212; Internal Data Source Name => [data source\u7684name] \/\/ESXi_CPU_Temp_1 &lt;== \u6703\u51fa\u73fe\u5728tab\u7684\u540d\u7a31<br \/>\n&#8212; Output Field => [\u9078\u64c7\u8981\u4f7f\u7528\u7684\u6b04\u4f4d\u540d\u7a31] \/\/\u9019\u908a\u6703\u81ea\u52d5\u6293\u53d6Data Input Method\u8a2d\u5b9a\u7684Output\u6b04\u4f4d\u8cc7\u8a0a<\/p>\n<\/li>\n<li>\n<p>\u65b0\u589e Graph Templates<br \/>\n\u901a\u5e38\u4e00\u500b\u4f86\u6e90\u8cc7\u6599\u5728Graph Item\u6703\u6709\u56db\u500b\u9805\u76ee<br \/>\n(1) \u756b\u7dda<br \/>\n&#8212; Color => \u9078\u559c\u6b61\u7684<br \/>\n&#8212; Graph Item Type => LINE1<br \/>\n&#8212; Consolidation Function => Average (\u53ef\u4ee5\u4f9d\u64da\u9700\u6c42\u9078\u64c7)<br \/>\n&#8212; Text Format => <a href=\"[\u6b04\u4f4d\u503c]\">\u6b04\u4f4d\u540d\u7a31<\/a> (\u6216\u662f\u8981\u986f\u793a\u7684\u6587\u5b57)<br \/>\n(2) \u6587\u5b57\u986f\u793a\u76ee\u524d\u503c<br \/>\n&#8212; Graph Item Type => GPRINT<br \/>\n&#8212; Consolidation Function => LAST<br \/>\n&#8212; Text Format => Current:<br \/>\n(3) \u6587\u5b57\u986f\u793a\u6700\u5927\u503c<br \/>\n&#8212; Graph Item Type => GPRINT<br \/>\n&#8212; Consolidation Function => MAX<br \/>\n&#8212; Text Format => MAX:<br \/>\n(4) \u6587\u5b57\u986f\u793a\u6700\u5c0f\u503c<br \/>\n&#8212; Graph Item Type => GPRINT<br \/>\n&#8212; Consolidation Function => MIN<br \/>\n&#8212; Text Format => MIN:<\/p>\n<\/li>\n<\/ol>\n<p>\u9019\u6642\u5f8c\u53ef\u4ee5\u767c\u73fe Graph Item Input \u6709\u81ea\u52d5\u589e\u52a0\u4e86<br \/>\n\u4e0b\u9762\u7684\u6b04\u4f4d\u53c3\u8003\u5982\u4e0b<br \/>\nTemplate => Name => [Template\u7684\u540d\u7a31]<br \/>\nGraph Template =><br \/>\n&#8212; Title => |host_description| &#8211; [\u5716\u7684\u540d\u7a31]<br \/>\n&#8212; Vertical Label => [\u6b04\u4f4d\u503c\u55ae\u4f4d\u6a19\u793a]<\/p>\n<p>\u7136\u5f8c\u65b0\u589eDevice\u7684Graph\uff0c\u5c31ok\u4e86&#8230;..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8a18\u5f97php\u6a94\u6848\u6700\u5f8creturn\u503c\u683c\u5f0f \u65b0\u589e Data Input Methods &lt;== \u547c\u53ebscript php\u65b9\u6cd5 Input Type => Script &#8211; Script Server (PHP) Input String => \/scripts\/[php\u6a94\u540d] [php\u5167\u4f7f\u7528\u7684function\u540d\u7a31] \uff1chostname\uff1e [\u53c3\u6578\u503c] Input Fields => hostname &#8212; Special Type Code ==> hostname Output Fields => \u6b04\u4f4d\u540d\u7a31 \u65b0\u589eData Templates Data &hellip; <a href=\"https:\/\/cowmanchiang.me\/wp\/?p=1085\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-1085","post","type-post","status-publish","format-standard","hentry","category-cacti"],"_links":{"self":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1085","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1085"}],"version-history":[{"count":1,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1085\/revisions"}],"predecessor-version":[{"id":2007,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1085\/revisions\/2007"}],"wp:attachment":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1085"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1085"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1085"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}