{"id":3663,"date":"2013-01-14T22:23:18","date_gmt":"2013-01-14T13:23:18","guid":{"rendered":"http:\/\/umezawa.dyndns.info\/wordpress\/?p=3663"},"modified":"2013-01-14T22:23:18","modified_gmt":"2013-01-14T13:23:18","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-3","status":"publish","type":"post","link":"http:\/\/umezawa.dyndns.info\/wordpress\/?p=3663","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\uff08\u305d\u306e\uff13\uff09"},"content":{"rendered":"<p>\u307e\u305f\u3082\u3084\u672c\u8cea\u7684\u3067\u306f\u306a\u3044\u88dc\u8db3\u306a\u3093\u3067\u3059\u304c\u2026<\/p>\n<p><!--more--><\/p>\n<p>\u7d39\u4ecb\u3057\u305f check_snmp_disk_monitor.pl \u306f\u3001\u4f7f\u7528\u7387\u3092\u8a08\u7b97\u3057\u305f\u6642\u306b\u6307\u6570\u8868\u8a18\u306b\u306a\u308b\u5834\u5408\uff08\u4f7f\u7528\u7387\u304c 0 \u3088\u308a\u5927\u304d\u304f 0.01% \u672a\u6e80\u306e\u5834\u5408\uff09\u3092\u30b1\u30a2\u3057\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n<blockquote>\n<pre># find the percentate - eval to avoid divide by zero errors\r\neval { $mounts{$key}->{percent_used} = $mounts{$key}->{used} \/ $mounts{$key}->{size} };\r\n$mounts{$key}->{percent_used} =~ s\/^0\\.([0-9]{1,2})([0-9]?).*\/\\1\/; # truncate\r\nif ( $2 >= 5 ) { $mounts{$key}->{percent_used}++ }; # round the number number<\/pre>\n<\/blockquote>\n<p>\u4f55\u3053\u306e\u30a2\u30db\u306a\u30b3\u30fc\u30c9\u3002<\/p>\n<p>\u4f55\u6545\u7d20\u76f4\u306b<\/p>\n<blockquote>\n<pre>$mounts{$key}->{percent_used} = 0;\r\neval { $mounts{$key}->{percent_used} = int($mounts{$key}->{used} * 100.0 \/ $mounts{$key}->{size}) };<\/pre>\n<\/blockquote>\n<p>\u3068\u3057\u306a\u3044\u306e\u304b\u2026<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u307e\u305f\u3082\u3084\u672c\u8cea\u7684\u3067\u306f\u306a\u3044\u88dc\u8db3\u306a\u3093\u3067\u3059\u304c\u2026<\/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-3663","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\/3663","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=3663"}],"version-history":[{"count":4,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3663\/revisions"}],"predecessor-version":[{"id":3667,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3663\/revisions\/3667"}],"wp:attachment":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3663"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}