{"id":3623,"date":"2013-01-01T20:47:13","date_gmt":"2013-01-01T11:47:13","guid":{"rendered":"http:\/\/umezawa.dyndns.info\/wordpress\/?p=3623"},"modified":"2013-01-01T21:00:52","modified_gmt":"2013-01-01T12:00:52","slug":"windows-%e3%83%9b%e3%82%b9%e3%83%88%e3%81%ae%e3%83%87%e3%82%a3%e3%82%b9%e3%82%af%e4%bd%bf%e7%94%a8%e9%87%8f%e3%82%92-snmp-%e7%b5%8c%e7%94%b1%e3%81%ae-nagios-%e3%81%a7%e7%9b%a3%e8%a6%96%e3%81%99","status":"publish","type":"post","link":"http:\/\/umezawa.dyndns.info\/wordpress\/?p=3623","title":{"rendered":"Windows \u30db\u30b9\u30c8\u306e\u30c7\u30a3\u30b9\u30af\u4f7f\u7528\u91cf\u3092 SNMP \u7d4c\u7531\u306e Nagios \u3067\u76e3\u8996\u3059\u308b"},"content":{"rendered":"<p>\u3046\u3063\u304b\u308a\u30c7\u30a3\u30b9\u30af\u30d5\u30eb\u306b\u3057\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002\u3053\u308c\u3067\uff13\u56de\u76ee\u306a\u6c17\u304c\u3057\u307e\u3059\u3002\u4eca\u5ea6\u3053\u305d\u76e3\u8996\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3088\u3046\u3068\u601d\u3044\u7acb\u3061\u307e\u3057\u305f\u3002\u5bb6\u5ead\u5185\u76e3\u8996\u30b7\u30b9\u30c6\u30e0\u306f Nagios \u3067\u7d44\u3093\u3067\u3044\u308b\u306e\u3067\u3059\u304c\u3001Windows \u306b NRPE \u306f\u7121\u3044\u3067\u3057\u3087\u3046\u304b\u3089 SNMP \u7d4c\u7531\u3067\u76e3\u8996\u3059\u308b\u3053\u3068\u3092\u8003\u3048\u307e\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<p>Windows \u3067\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 Windows \u3067\u3082 SNMP \u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u30022000 \u306f\u3069\u3046\u3060\u3063\u305f\u304b\u65e2\u306b\u899a\u3048\u3066\u307e\u305b\u3093\u304c\u3001XP \u4ee5\u964d\u3067\u306f\u5927\u4e08\u592b\u3067\u3059\u3002<\/p>\n<p>XP \u306e\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u3059\u3002<\/p>\n<ol>\n<li>\u300c\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d1\u30cd\u30eb\u300d\u2192\u300c\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u8ffd\u52a0\u3068\u524a\u9664\u300d\u2192\u300cWindows\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u8ffd\u52a0\u3068\u524a\u9664\u300d\u2192\u300c\u7ba1\u7406\u3068\u30e2\u30cb\u30bf\u30c4\u30fc\u30eb\u300d\u3092\u9078\u3093\u3067\u300c\u8a73\u7d30\u300d\u2192\u300c\u7c21\u6613\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7ba1\u7406\u30d7\u30ed\u30c8\u30b3\u30eb (SNMP)\u300d\uff08\u300cWMI SNMP\u30d7\u30ed\u30d0\u30a4\u30c0\u300d\u306f\u4e0d\u8981\uff09 \u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002\uff08\u8981CD\uff09<\/li>\n<li>SNMP Service \u30b5\u30fc\u30d3\u30b9\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u300c\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u300d\u30bf\u30d6\u3067\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u540d\u3092\u8a2d\u5b9a\u3059\u308b\u3002\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u306f\u4f8b\u306b\u3088\u3063\u3066 &#8220;public&#8221;\uff09<\/li>\n<li>\u540c\u69d8\u306b\u3001\u30d1\u30b1\u30c3\u30c8\u3092\u53d7\u3051\u4ed8\u3051\u308b\u30a2\u30c9\u30ec\u30b9\u3092\u8a2d\u5b9a\u3059\u308b\u3002\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u306f\u5168\u3066\u306e\u30db\u30b9\u30c8\uff09<\/li>\n<li>\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3060\u3051\u3067\u306f Windows \u30d5\u30a1\u30a4\u30a2\u30fc\u30a6\u30a9\u30fc\u30eb\u306b\u7a74\u304c\u958b\u304b\u306a\u3044\u306e\u3067\u3001\u304c\u3093\u3070\u3063\u3066\u958b\u3051\u308b\u3002<\/li>\n<\/ol>\n<p>Win7 \u306e\u5834\u5408\u306f\u3082\u3046\u3061\u3087\u3063\u3068\u624b\u9806\u304c\u7c21\u5358\uff06\u30bb\u30ad\u30e5\u30a2\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<ol>\n<li>\u300c\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d1\u30cd\u30eb\u300d\u2192\u300c\u30d7\u30ed\u30b0\u30e9\u30e0\u300d\u2192\u300c\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u6a5f\u80fd\u300d\u2192\u300cWindows \u306e\u6a5f\u80fd\u306e\u6709\u52b9\u5316\u307e\u305f\u306f\u7121\u52b9\u5316\u300d\u2192\u300c\u7c21\u6613\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7ba1\u7406\u30d7\u30ed\u30c8\u30b3\u30eb (SNMP)\u300d\uff08\u3084\u3063\u3071\u308a\u300cWMI SNMP \u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u300d\u306f\u4e0d\u8981\uff09 \u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002\uff08CD\u4e0d\u8981\u307d\u3044\uff09<\/li>\n<li>\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3060\u3051\u3067 Windows \u30d5\u30a1\u30a4\u30a2\u30fc\u30a6\u30a9\u30fc\u30eb\u306b\u9069\u5207\u306b\u7a74\u304c\u958b\u304f\u3002\uff08\u304c\u3001\u5f8c\u8ff0\u306e\u3068\u304a\u308a\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u554f\u984c\u306f\u7121\u3044\uff09<\/li>\n<li>SNMP Service \u30b5\u30fc\u30d3\u30b9\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u300c\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u300d\u30bf\u30d6\u3067\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u540d\u3092\u8a2d\u5b9a\u3059\u308b\u3002\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u306f\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30ea\u30b9\u30c8\u304c\u7a7a\u3067\u3001\u3064\u307e\u308a\u4e00\u5207\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u62d2\u5426\u3059\u308b\u3053\u3068\u306b\u306a\u308b\uff09<\/li>\n<li>\u540c\u69d8\u306b\u3001\u30d1\u30b1\u30c3\u30c8\u3092\u53d7\u3051\u4ed8\u3051\u308b\u30a2\u30c9\u30ec\u30b9\u3092\u8a2d\u5b9a\u3059\u308b\u3002\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u306f localhost \u306e\u307f\uff09<\/li>\n<\/ol>\n<p>\u3067\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u898b\u3048\u307e\u3059\uff08\u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u3068\u3053\u308d\u3060\u3051\uff09<\/p>\n<blockquote>\n<pre>[umezawa@nyx:pts\/0 ~]$ snmpwalk -v 1 -c public windows-xp-host.local .1.3.6.1.2.1.25.2.3.1 | nkf -Sw\r\nHOST-RESOURCES-MIB::hrStorageIndex.1 = INTEGER: 1\r\nHOST-RESOURCES-MIB::hrStorageIndex.2 = INTEGER: 2\r\nHOST-RESOURCES-MIB::hrStorageIndex.3 = INTEGER: 3\r\nHOST-RESOURCES-MIB::hrStorageIndex.4 = INTEGER: 4\r\nHOST-RESOURCES-MIB::hrStorageIndex.5 = INTEGER: 5\r\nHOST-RESOURCES-MIB::hrStorageType.1 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk\r\nHOST-RESOURCES-MIB::hrStorageType.2 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk\r\nHOST-RESOURCES-MIB::hrStorageType.3 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk\r\nHOST-RESOURCES-MIB::hrStorageType.4 = OID: HOST-RESOURCES-TYPES::hrStorageVirtualMemory\r\nHOST-RESOURCES-MIB::hrStorageType.5 = OID: HOST-RESOURCES-TYPES::hrStorageRam\r\nHOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: C:\\ Label:  Serial Number c8bf8738\r\nHOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: D:\\ Label:\u30dc\u30ea\u30e5\u30fc\u30e0  Serial Number 22ac536\r\nHOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Z:\\ Label:SWAP  Serial Number 9c04ff9e\r\nHOST-RESOURCES-MIB::hrStorageDescr.4 = STRING: Virtual Memory\r\nHOST-RESOURCES-MIB::hrStorageDescr.5 = STRING: Physical Memory\r\nHOST-RESOURCES-MIB::hrStorageAllocationUnits.1 = INTEGER: 4096 Bytes\r\nHOST-RESOURCES-MIB::hrStorageAllocationUnits.2 = INTEGER: 4096 Bytes\r\nHOST-RESOURCES-MIB::hrStorageAllocationUnits.3 = INTEGER: 4096 Bytes\r\nHOST-RESOURCES-MIB::hrStorageAllocationUnits.4 = INTEGER: 65536 Bytes\r\nHOST-RESOURCES-MIB::hrStorageAllocationUnits.5 = INTEGER: 65536 Bytes\r\nHOST-RESOURCES-MIB::hrStorageSize.1 = INTEGER: 25165814\r\nHOST-RESOURCES-MIB::hrStorageSize.2 = INTEGER: 94371834\r\nHOST-RESOURCES-MIB::hrStorageSize.3 = INTEGER: 2558351\r\nHOST-RESOURCES-MIB::hrStorageSize.4 = INTEGER: 115928\r\nHOST-RESOURCES-MIB::hrStorageSize.5 = INTEGER: 53238\r\nHOST-RESOURCES-MIB::hrStorageUsed.1 = INTEGER: 5353942\r\nHOST-RESOURCES-MIB::hrStorageUsed.2 = INTEGER: 55312796\r\nHOST-RESOURCES-MIB::hrStorageUsed.3 = INTEGER: 1058002\r\nHOST-RESOURCES-MIB::hrStorageUsed.4 = INTEGER: 16946\r\nHOST-RESOURCES-MIB::hrStorageUsed.5 = INTEGER: 25723\r\nHOST-RESOURCES-MIB::hrStorageAllocationFailures.1 = Counter32: 0\r\nHOST-RESOURCES-MIB::hrStorageAllocationFailures.2 = Counter32: 0\r\nHOST-RESOURCES-MIB::hrStorageAllocationFailures.3 = Counter32: 0\r\nHOST-RESOURCES-MIB::hrStorageAllocationFailures.4 = Counter32: 0\r\nHOST-RESOURCES-MIB::hrStorageAllocationFailures.5 = Counter32: 0\r\n[umezawa@nyx:pts\/0 ~]$<\/pre>\n<\/blockquote>\n<p>\u30dc\u30ea\u30e5\u30fc\u30e0\u30e9\u30d9\u30eb\u3092 SJIS \u3067\u9001\u3063\u3066\u304f\u308b\u306e\u3067\u3001\u4e0a\u3067\u306f UTF-8 \u306b\u5909\u63db\u3057\u3066\u3044\u307e\u3059\u3002\uff08\u30bf\u30fc\u30df\u30ca\u30eb\u304c UTF-8 \u306a\u306e\u3067\uff09<\/p>\n<p>\u3067\u3001\u3053\u308c\u3092 Nagios \u3067\u76e3\u8996\u3059\u308b\u308f\u3051\u3067\u3059\u304c\u3001\/usr\/lib\/nagios\/plugins\/contrib\/snmp_disk_monitor.pl \u3068\u3044\u3046\u306e\u304c\u3042\u3063\u305f\u306e\u3067\u3053\u308c\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<blockquote>\n<pre>[umezawa@nyx:pts\/1 contrib]$ .\/check_snmp_disk_monitor.pl -H windows-xp-host.local -C public -m 'C:\\ Label:  Serial Number c8bf8738'; echo $?\r\nDisk OK - 21% used on C:\\ Label:  Serial Number c8bf8738\r\n0\r\n[umezawa@nyx:pts\/1 contrib]$<\/pre>\n<\/blockquote>\n<p>\u3046\u307e\u304f\u3067\u304d\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002\u3042\u3068\u306f\u4ed6\u306e\u30e2\u30ce\u306e\u76e3\u8996\u3068\u540c\u3058\u3088\u3046\u306b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u3051\u3070 OK\u3002<\/p>\n<p>\u6700\u5f8c\u306b\u6ce8\u610f\u70b9\u304c\uff12\u3064\u307b\u3069\u3002<\/p>\n<ul>\n<li>\u30c9\u30e9\u30a4\u30d6\u30ec\u30bf\u30fc\uff08\u3064\u307e\u308a Unix \u3067\u8a00\u3046\u3068\u3053\u308d\u306e\u30de\u30a6\u30f3\u30c8\u30dd\u30a4\u30f3\u30c8\uff09\u3060\u3051\u3067\u306a\u304f\u30dc\u30ea\u30e5\u30fc\u30e0\u30e9\u30d9\u30eb\u3084\u30dc\u30ea\u30e5\u30fc\u30e0\u30b7\u30ea\u30a2\u30eb\u30ca\u30f3\u30d0\u30fc\u307e\u3067\u542b\u3081\u3066\u6307\u5b9a\u3057\u306a\u3051\u308c\u3070\u3044\u3051\u306a\u3044\u305f\u3081\u3001\u30dc\u30ea\u30e5\u30fc\u30e0\u30e9\u30d9\u30eb\u3092\u5909\u66f4\u3057\u305f\u308a\u30c7\u30a3\u30b9\u30af\u3092\u518d\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3057\u3066\u30dc\u30ea\u30e5\u30fc\u30e0\u30b7\u30ea\u30a2\u30eb\u30ca\u30f3\u30d0\u30fc\u304c\u5909\u5316\u3057\u305f\u308a\u3059\u308b\u3068\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u66f8\u304d\u63db\u3048\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<\/li>\n<li>\u30dc\u30ea\u30e5\u30fc\u30e0\u30e9\u30d9\u30eb\u3092\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304f\u3053\u3068\u306b\u306a\u308b\u306e\u3067\u3001\u76e3\u8996\u5bfe\u8c61\u306e\u30dc\u30ea\u30e5\u30fc\u30e0\u30e9\u30d9\u30eb\u306b\u6f22\u5b57\u7b49\u3092\u4f7f\u3046\u306e\u306f\u907f\u3051\u305f\u65b9\u304c\u3088\u3055\u305d\u3046\u3002<\/li>\n<\/ul>\n<p>SNMP \u6c4e\u7528\u3067\u306f\u306a\u304f Windows \u306e SNMP \u306b\u7279\u5316\u3057\u305f\u30c1\u30a7\u30c3\u30af\u30d7\u30e9\u30b0\u30a4\u30f3\u306a\u3089\u3053\u3046\u3044\u3046\u554f\u984c\u306f\u7121\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3046\u3063\u304b\u308a\u30c7\u30a3\u30b9\u30af\u30d5\u30eb\u306b\u3057\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002\u3053\u308c\u3067\uff13\u56de\u76ee\u306a\u6c17\u304c\u3057\u307e\u3059\u3002\u4eca\u5ea6\u3053\u305d\u76e3\u8996\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3088\u3046\u3068\u601d\u3044\u7acb\u3061\u307e\u3057\u305f\u3002\u5bb6\u5ead\u5185\u76e3\u8996\u30b7\u30b9\u30c6\u30e0\u306f Nagios \u3067\u7d44\u3093\u3067\u3044\u308b\u306e\u3067\u3059\u304c\u3001Windows \u306b NRPE \u306f\u7121\u3044\u3067\u3057\u3087\u3046\u304b\u3089 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[],"class_list":["post-3623","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3623","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3623"}],"version-history":[{"count":6,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3623\/revisions"}],"predecessor-version":[{"id":3629,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3623\/revisions\/3629"}],"wp:attachment":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3623"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}