GitHub PullRequestReviewCommentEvent at 2014-04-06 12:32:28
Repository: munin-plugins
Actor: lamanotrama
Payload: {"comment":{"url":"https://api.github.com/repos/tacahilo/munin-plugins/pulls/comments/11326008","id":11326008,"diff_hunk":"@@ -0,0 +1,63 @@\n+#!/bin/bash\n+#\n+# ## Plugin for Munin to monitor bad sectors\n+# Author: Okumura Takahiro <hfm.garden@gmail.com>\n+#\n+# ## Description:\n+#\n+# This plugin uses smartctl command to get the number of bad sectors (S.M.A.R.T ID:5).\n+#\n+# sample conf\n+# [bad_sector]\n+# user root\n+#\n+#%# family=auto\n+#%# capabilities=autoconf\n+\n+LANG=C\n+export PATH=$PATH:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin\n+\n+# Defaulh threshold\n+warning=\"10:\"\n+critical=\"20:\"\n+\n+smartctl=$(which smartctl)\n+if [ \"$1\" = \"autoconf\" ]; then\n+    if [ -x \"$smartctl\" ]; then\n+        echo yes\n+        exit 0\n+    else\n+        echo \"no (smartctl is not exist.)\"\n+        exit 1\n+    fi\n+fi\n+\n+# get device list like (sda sda1 sda2 sdb ...)\n+devices=$(awk '$4 ~ /^\\wd\\w+$/ {print $4}' /proc/partitions)\n+\n+ssds=\"\"","path":"bad_sector","position":38,"original_position":38,"commit_id":"e624828332979c444e107e6cc0b17d8c79a03e1f","original_commit_id":"e624828332979c444e107e6cc0b17d8c79a03e1f","user":{"login":"lamanotrama","id":329120,"avatar_url":"https://avatars.githubusercontent.com/u/329120?","gravatar_id":"5c0977057cfea0fbf61afeae0efdd42e","url":"https://api.github.com/users/lamanotrama","html_url":"https://github.com/lamanotrama","followers_url":"https://api.github.com/users/lamanotrama/followers","following_url":"https://api.github.com/users/lamanotrama/following{/other_user}","gists_url":"https://api.github.com/users/lamanotrama/gists{/gist_id}","starred_url":"https://api.github.com/users/lamanotrama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamanotrama/subscriptions","organizations_url":"https://api.github.com/users/lamanotrama/orgs","repos_url":"https://api.github.com/users/lamanotrama/repos","events_url":"https://api.github.com/users/lamanotrama/events{/privacy}","received_events_url":"https://api.github.com/users/lamanotrama/received_events","type":"User","site_admin":false},"body":"あわわ`ssd`","created_at":"2014-04-06T12:32:28Z","updated_at":"2014-04-06T12:32:28Z","html_url":"https://github.com/tacahilo/munin-plugins/pull/1#discussion_r11326008","pull_request_url":"https://api.github.com/repos/tacahilo/munin-plugins/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/tacahilo/munin-plugins/pulls/comments/11326008"},"html":{"href":"https://github.com/tacahilo/munin-plugins/pull/1#discussion_r11326008"},"pull_request":{"href":"https://api.github.com/repos/tacahilo/munin-plugins/pulls/1"}}}}