{"id":489,"date":"2019-06-17T18:19:27","date_gmt":"2019-06-17T10:19:27","guid":{"rendered":"http:\/\/www.laihp.top\/wordpress\/?p=489"},"modified":"2023-02-10T10:40:30","modified_gmt":"2023-02-10T02:40:30","slug":"h3c%e4%ba%a4%e6%8d%a2%e6%9c%basnmp%e9%85%8d%e7%bd%ae%e5%bc%80%e5%90%afsnmp%e5%ae%9e%e4%be%8b","status":"publish","type":"post","link":"https:\/\/www.laihp.top\/zqb\/?p=489","title":{"rendered":"H3C\u4ea4\u6362\u673asnmp\u914d\u7f6e\u5f00\u542fsnmp\u5b9e\u4f8b"},"content":{"rendered":"<div id=\"artHd\" class=\"art-hd\"><\/div>\n<div class=\"art-bd\">\n<div id=\"JCmtImg\" class=\"content\">\n<table style=\"width: 100%; height: 560px;\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr style=\"height: 560px;\">\n<td style=\"height: 560px;\">\u3000\u3000\u6709\u65f6\u5019\u5904\u4e8e\u7f51\u7edc\u7ba1\u7406\u7684\u9700\u8981\uff0c\u6211\u4eec\u9700\u8981\u5f00\u542f\u4ea4\u6362\u673a\u7684snmp\u529f\u80fd\uff0c\u672c\u6587\u4ee5H3C\u4ea4\u6362\u673a\u4e3a\u4f8b\uff0c\u5177\u4f53\u52a0\u4ee5\u8bf4\u660e\uff1a<\/p>\n<p># \u8bbe\u7f6eSNMP\u57fa\u672c\u4fe1\u606f\uff0c\u5305\u62ec\u7248\u672c\u3001\u56e2\u4f53\u540d\u3002<\/p>\n<p>system-view<\/p>\n<p>[Sysname] snmp-agent sys-info version v1 v2c<\/p>\n<p>[Sysname] snmp-agent community read public<\/p>\n<p>[Sysname] snmp-agent community write private<\/p>\n<p># \u8bbe\u7f6e\u4ea4\u6362\u673a\u7684\u8054\u7cfb\u4eba\u548c\u4f4d\u7f6e\u4fe1\u606f\uff0c\u4ee5\u65b9\u4fbf\u7ef4\u62a4\u3002<\/p>\n<p>[Sysname] snmp-agent sys-info contact Mr.Wang-Tel:3306<\/p>\n<p>[Sysname] snmp-agent sys-info location telephone-closet,3rd-floor<\/p>\n<p># \u5141\u8bb8\u5411\u7f51\u7ba1\u5de5\u4f5c\u7ad9\uff08NMS\uff091.1.1.2\/24\u53d1\u9001Trap\u62a5\u6587\uff0c\u4f7f\u7528\u7684\u56e2\u4f53\u540d\u4e3apublic\u3002<\/p>\n<p>[Sysname] snmp-agent trap enable<\/p>\n<p>[Sysname] snmp-agent target-host trap address udp-domain 1.1.1.2 params securityname public v1<\/p>\n<p>snmp-agent target-host\u547d\u4ee4\u4e2d\u7684\u6307\u5b9a\u7684\u7248\u672c\u5fc5\u987b\u548cNMS\u4e0a\u8fd0\u884c\u7684SNMP\u7248\u672c\u4e00\u81f4\uff0c\u5982\u679cNMS\u4e0a\u8fd0\u884c\u7684\u662fSNMP v2c\u7248\u672c\uff0c\u5219\u9700\u8981\u5c06snmp-agent target-host\u547d\u4ee4\u4e2d\u7684\u7248\u672c\u53c2\u6570\u8bbe\u7f6e\u4e3av2c\u3002\u5426\u5219\uff0c\u7f51\u7ba1\u7ad9\u5c06\u6536\u4e0d\u5230Trap\u4fe1\u606f\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<h3>\u4eceLinux\u4e0a\u67e5\u8be2OID\u6570\u503c\u3002\u7136\u540e\u6dfb\u52a0\u5230zabbix\u670d\u52a1\u5668\u7684\u76d1\u63a7\u9879\u91cc\u3002<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[root@mzl ~]#  yum -y install net-snmp-utils\r\n\r\n[root@mzl ~]# snmpwalk -v1 -c public 192.168.177.1 .1.3.6.1.4.1.25506.2.6.1.1.1.1.8.11\r\nSNMPv2-SMI::enterprises.25506.2.6.1.1.1.1.8.11 = INTEGER: 67\r\n\r\n\r\nCPU-used\t\u89e6\u53d1\u5668 1\t.1.3.6.1.4.1.25506.2.6.1.1.1.1.6.11  3s\t90d\t365d\tSNMP \u4ee3\u7406\tCPU\t\u5df2\u542f\u7528\t\r\nMemory-used\t\u89e6\u53d1\u5668 1\t.1.3.6.1.4.1.25506.2.6.1.1.1.1.8.11  3s\t90d\t365d\tSNMP \u4ee3\u7406\tMemory\t\u5df2\u542f\u7528<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3000\u3000\u6709\u65f6\u5019\u5904\u4e8e\u7f51\u7edc\u7ba1\u7406\u7684\u9700\u8981\uff0c\u6211\u4eec\u9700\u8981\u5f00\u542f\u4ea4\u6362\u673a\u7684snmp\u529f\u80fd\uff0c\u672c\u6587\u4ee5H3C\u4ea4\u6362\u673a\u4e3a\u4f8b\uff0c\u5177\u4f53\u52a0\u4ee5\u8bf4\u660e\uff1a # \u8bbe &#8230; <a title=\"H3C\u4ea4\u6362\u673asnmp\u914d\u7f6e\u5f00\u542fsnmp\u5b9e\u4f8b\" class=\"read-more\" href=\"https:\/\/www.laihp.top\/zqb\/?p=489\" aria-label=\"\u7ee7\u7eed\u9605\u8bfbH3C\u4ea4\u6362\u673asnmp\u914d\u7f6e\u5f00\u542fsnmp\u5b9e\u4f8b\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-489","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/posts\/489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=489"}],"version-history":[{"count":5,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/posts\/489\/revisions"}],"predecessor-version":[{"id":2179,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/posts\/489\/revisions\/2179"}],"wp:attachment":[{"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}