{"action":"created","comment":{"url":"https://api.github.com/repos/bosun-monitor/bosun/pulls/comments/27250803","id":27250803,"diff_hunk":"@@ -236,6 +236,33 @@ func c_redis() (opentsdb.MultiDataPoint, error) {\n \t\t\t\tAdd(&md, \"redis.\"+sp[0], status(sp[1]), tags, metadata.Unknown, metadata.None, \"\")\n \t\t\t\tcontinue\n \t\t\t}\n+\t\t\tif strings.HasPrefix(sp[0], \"cmdstat_\") {\n+\t\t\t\tcmdStats := strings.Split(sp[1], \",\")\n+\t\t\t\tif len(cmdStats) < 3 {\n+\t\t\t\t\tcontinue\n+\t\t\t\t}\n+\t\t\t\tcmdStatsCalls := strings.Split(cmdStats[0], \"=\")\n+\t\t\t\tcmdStatsUsec := strings.Split(cmdStats[1], \"=\")\n+\t\t\t\tvar cmdStatsMsec, cmdStatsMsecPc float64\n+\t\t\t\tmicrosec, err := strconv.ParseFloat(cmdStatsUsec[1], 64)\n+\t\t\t\tif err != nil {\n+\t\t\t\t\tcontinue\n+\t\t\t\t}\n+\t\t\t\tcmdStatsMsec = microsec / 1000\n+\t\t\t\tcmdStatsUsecPc := strings.Split(cmdStats[2], \"=\")\n+\t\t\t\tmicrosec, err = strconv.ParseFloat(cmdStatsUsecPc[1], 64)\n+\t\t\t\tif err != nil {\n+\t\t\t\t\tcontinue\n+\t\t\t\t}\n+\t\t\t\tcmdStatsMsecPc = microsec / 1000\n+\t\t\t\tif shortTag := strings.Split(sp[0], \"_\"); len(shortTag) == 2 {\n+\t\t\t\t\ttags[\"cmd\"] = shortTag[1]","path":"cmd/scollector/collectors/redis_unix.go","position":49,"original_position":49,"commit_id":"be63d7482b926cd5c438fa7bc883f934b6d4fe3a","original_commit_id":"be63d7482b926cd5c438fa7bc883f934b6d4fe3a","user":{"login":"kylebrandt","id":1692624,"avatar_url":"https://avatars.githubusercontent.com/u/1692624?v=3","gravatar_id":"","url":"https://api.github.com/users/kylebrandt","html_url":"https://github.com/kylebrandt","followers_url":"https://api.github.com/users/kylebrandt/followers","following_url":"https://api.github.com/users/kylebrandt/following{/other_user}","gists_url":"https://api.github.com/users/kylebrandt/gists{/gist_id}","starred_url":"https://api.github.com/users/kylebrandt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylebrandt/subscriptions","organizations_url":"https://api.github.com/users/kylebrandt/orgs","repos_url":"https://api.github.com/users/kylebrandt/repos","events_url":"https://api.github.com/users/kylebrandt/events{/privacy}","received_events_url":"https://api.github.com/users/kylebrandt/received_events","type":"User","site_admin":false},"body":"len here as well","created_at":"2015-03-26T20:08:55Z","updated_at":"2015-03-26T20:08:55Z","html_url":"https://github.com/bosun-monitor/bosun/pull/831#discussion_r27250803","pull_request_url":"https://api.github.com/repos/bosun-monitor/bosun/pulls/831","_links":{"self":{"href":"https://api.github.com/repos/bosun-monitor/bosun/pulls/comments/27250803"},"html":{"href":"https://github.com/bosun-monitor/bosun/pull/831#discussion_r27250803"},"pull_request":{"href":"https://api.github.com/repos/bosun-monitor/bosun/pulls/831"}}},"pull_request":{"url":"https://api.github.com/repos/bosun-monitor/bosun/pulls/831","id":31777939,"html_url":"https://github.com/bosun-monitor/bosun/pull/831","diff_url":"https://github.com/bosun-monitor/bosun/pull/831.diff","patch_url":"https://github.com/bosun-monitor/bosun/pull/831.patch","issue_url":"https://api.github.com/repos/bosun-monitor/bosun/issues/831","number":831,"state":"open","locked":false,"title":"  cmd/scollector: commandstats metrics for redis #3","user":{"login":"ptqa","id":8643966,"avatar_url":"https://avatars.githubusercontent.com/u/8643966?v=3","gravatar_id":"","url":"https://api.github.com/users/ptqa","html_url":"https://github.com/ptqa","followers_url":"https://api.github.com/users/ptqa/followers","following_url":"https://api.github.com/users/ptqa/following{/other_user}","gists_url":"https://api.github.com/users/ptqa/gists{/gist_id}","starred_url":"https://api.github.com/users/ptqa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptqa/subscriptions","organizations_url":"https://api.github.com/users/ptqa/orgs","repos_url":"https://api.github.com/users/ptqa/repos","events_url":"https://api.github.com/users/ptqa/events{/privacy}","received_events_url":"https://api.github.com/users/ptqa/received_events","type":"User","site_admin":false},"body":"And again I forgot to commit before push. [Previous try] (https://github.com/bosun-monitor/bosun/pull/816)\r\n\r\nChanged if logic as @mjibson advised.  ","created_at":"2015-03-23T21:53:13Z","updated_at":"2015-03-26T20:08:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f04770c1695870f9ea216431418ff17628d7b0fa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bosun-monitor/bosun/pulls/831/commits","review_comments_url":"https://api.github.com/repos/bosun-monitor/bosun/pulls/831/comments","review_comment_url":"https://api.github.com/repos/bosun-monitor/bosun/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bosun-monitor/bosun/issues/831/comments","statuses_url":"https://api.github.com/repos/bosun-monitor/bosun/statuses/be63d7482b926cd5c438fa7bc883f934b6d4fe3a","head":{"label":"ptqa:master","ref":"master","sha":"be63d7482b926cd5c438fa7bc883f934b6d4fe3a","user":{"login":"ptqa","id":8643966,"avatar_url":"https://avatars.githubusercontent.com/u/8643966?v=3","gravatar_id":"","url":"https://api.github.com/users/ptqa","html_url":"https://github.com/ptqa","followers_url":"https://api.github.com/users/ptqa/followers","following_url":"https://api.github.com/users/ptqa/following{/other_user}","gists_url":"https://api.github.com/users/ptqa/gists{/gist_id}","starred_url":"https://api.github.com/users/ptqa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptqa/subscriptions","organizations_url":"https://api.github.com/users/ptqa/orgs","repos_url":"https://api.github.com/users/ptqa/repos","events_url":"https://api.github.com/users/ptqa/events{/privacy}","received_events_url":"https://api.github.com/users/ptqa/received_events","type":"User","site_admin":false},"repo":{"id":32338118,"name":"bosun","full_name":"ptqa/bosun","owner":{"login":"ptqa","id":8643966,"avatar_url":"https://avatars.githubusercontent.com/u/8643966?v=3","gravatar_id":"","url":"https://api.github.com/users/ptqa","html_url":"https://github.com/ptqa","followers_url":"https://api.github.com/users/ptqa/followers","following_url":"https://api.github.com/users/ptqa/following{/other_user}","gists_url":"https://api.github.com/users/ptqa/gists{/gist_id}","starred_url":"https://api.github.com/users/ptqa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptqa/subscriptions","organizations_url":"https://api.github.com/users/ptqa/orgs","repos_url":"https://api.github.com/users/ptqa/repos","events_url":"https://api.github.com/users/ptqa/events{/privacy}","received_events_url":"https://api.github.com/users/ptqa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ptqa/bosun","description":"Time Series Alerting Framework","fork":true,"url":"https://api.github.com/repos/ptqa/bosun","forks_url":"https://api.github.com/repos/ptqa/bosun/forks","keys_url":"https://api.github.com/repos/ptqa/bosun/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ptqa/bosun/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ptqa/bosun/teams","hooks_url":"https://api.github.com/repos/ptqa/bosun/hooks","issue_events_url":"https://api.github.com/repos/ptqa/bosun/issues/events{/number}","events_url":"https://api.github.com/repos/ptqa/bosun/events","assignees_url":"https://api.github.com/repos/ptqa/bosun/assignees{/user}","branches_url":"https://api.github.com/repos/ptqa/bosun/branches{/branch}","tags_url":"https://api.github.com/repos/ptqa/bosun/tags","blobs_url":"https://api.github.com/repos/ptqa/bosun/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ptqa/bosun/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ptqa/bosun/git/refs{/sha}","trees_url":"https://api.github.com/repos/ptqa/bosun/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ptqa/bosun/statuses/{sha}","languages_url":"https://api.github.com/repos/ptqa/bosun/languages","stargazers_url":"https://api.github.com/repos/ptqa/bosun/stargazers","contributors_url":"https://api.github.com/repos/ptqa/bosun/contributors","subscribers_url":"https://api.github.com/repos/ptqa/bosun/subscribers","subscription_url":"https://api.github.com/repos/ptqa/bosun/subscription","commits_url":"https://api.github.com/repos/ptqa/bosun/commits{/sha}","git_commits_url":"https://api.github.com/repos/ptqa/bosun/git/commits{/sha}","comments_url":"https://api.github.com/repos/ptqa/bosun/comments{/number}","issue_comment_url":"https://api.github.com/repos/ptqa/bosun/issues/comments{/number}","contents_url":"https://api.github.com/repos/ptqa/bosun/contents/{+path}","compare_url":"https://api.github.com/repos/ptqa/bosun/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ptqa/bosun/merges","archive_url":"https://api.github.com/repos/ptqa/bosun/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ptqa/bosun/downloads","issues_url":"https://api.github.com/repos/ptqa/bosun/issues{/number}","pulls_url":"https://api.github.com/repos/ptqa/bosun/pulls{/number}","milestones_url":"https://api.github.com/repos/ptqa/bosun/milestones{/number}","notifications_url":"https://api.github.com/repos/ptqa/bosun/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ptqa/bosun/labels{/name}","releases_url":"https://api.github.com/repos/ptqa/bosun/releases{/id}","created_at":"2015-03-16T16:29:13Z","updated_at":"2015-03-26T19:58:52Z","pushed_at":"2015-03-26T19:58:52Z","git_url":"git://github.com/ptqa/bosun.git","ssh_url":"git@github.com:ptqa/bosun.git","clone_url":"https://github.com/ptqa/bosun.git","svn_url":"https://github.com/ptqa/bosun","homepage":"http://bosun.org","size":10129,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bosun-monitor:master","ref":"master","sha":"ff10540da80125b344ce64c60db6b1cfda47d15a","user":{"login":"bosun-monitor","id":9555242,"avatar_url":"https://avatars.githubusercontent.com/u/9555242?v=3","gravatar_id":"","url":"https://api.github.com/users/bosun-monitor","html_url":"https://github.com/bosun-monitor","followers_url":"https://api.github.com/users/bosun-monitor/followers","following_url":"https://api.github.com/users/bosun-monitor/following{/other_user}","gists_url":"https://api.github.com/users/bosun-monitor/gists{/gist_id}","starred_url":"https://api.github.com/users/bosun-monitor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bosun-monitor/subscriptions","organizations_url":"https://api.github.com/users/bosun-monitor/orgs","repos_url":"https://api.github.com/users/bosun-monitor/repos","events_url":"https://api.github.com/users/bosun-monitor/events{/privacy}","received_events_url":"https://api.github.com/users/bosun-monitor/received_events","type":"Organization","site_admin":false},"repo":{"id":14410778,"name":"bosun","full_name":"bosun-monitor/bosun","owner":{"login":"bosun-monitor","id":9555242,"avatar_url":"https://avatars.githubusercontent.com/u/9555242?v=3","gravatar_id":"","url":"https://api.github.com/users/bosun-monitor","html_url":"https://github.com/bosun-monitor","followers_url":"https://api.github.com/users/bosun-monitor/followers","following_url":"https://api.github.com/users/bosun-monitor/following{/other_user}","gists_url":"https://api.github.com/users/bosun-monitor/gists{/gist_id}","starred_url":"https://api.github.com/users/bosun-monitor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bosun-monitor/subscriptions","organizations_url":"https://api.github.com/users/bosun-monitor/orgs","repos_url":"https://api.github.com/users/bosun-monitor/repos","events_url":"https://api.github.com/users/bosun-monitor/events{/privacy}","received_events_url":"https://api.github.com/users/bosun-monitor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bosun-monitor/bosun","description":"Time Series Alerting Framework","fork":false,"url":"https://api.github.com/repos/bosun-monitor/bosun","forks_url":"https://api.github.com/repos/bosun-monitor/bosun/forks","keys_url":"https://api.github.com/repos/bosun-monitor/bosun/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bosun-monitor/bosun/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bosun-monitor/bosun/teams","hooks_url":"https://api.github.com/repos/bosun-monitor/bosun/hooks","issue_events_url":"https://api.github.com/repos/bosun-monitor/bosun/issues/events{/number}","events_url":"https://api.github.com/repos/bosun-monitor/bosun/events","assignees_url":"https://api.github.com/repos/bosun-monitor/bosun/assignees{/user}","branches_url":"https://api.github.com/repos/bosun-monitor/bosun/branches{/branch}","tags_url":"https://api.github.com/repos/bosun-monitor/bosun/tags","blobs_url":"https://api.github.com/repos/bosun-monitor/bosun/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bosun-monitor/bosun/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bosun-monitor/bosun/git/refs{/sha}","trees_url":"https://api.github.com/repos/bosun-monitor/bosun/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bosun-monitor/bosun/statuses/{sha}","languages_url":"https://api.github.com/repos/bosun-monitor/bosun/languages","stargazers_url":"https://api.github.com/repos/bosun-monitor/bosun/stargazers","contributors_url":"https://api.github.com/repos/bosun-monitor/bosun/contributors","subscribers_url":"https://api.github.com/repos/bosun-monitor/bosun/subscribers","subscription_url":"https://api.github.com/repos/bosun-monitor/bosun/subscription","commits_url":"https://api.github.com/repos/bosun-monitor/bosun/commits{/sha}","git_commits_url":"https://api.github.com/repos/bosun-monitor/bosun/git/commits{/sha}","comments_url":"https://api.github.com/repos/bosun-monitor/bosun/comments{/number}","issue_comment_url":"https://api.github.com/repos/bosun-monitor/bosun/issues/comments{/number}","contents_url":"https://api.github.com/repos/bosun-monitor/bosun/contents/{+path}","compare_url":"https://api.github.com/repos/bosun-monitor/bosun/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bosun-monitor/bosun/merges","archive_url":"https://api.github.com/repos/bosun-monitor/bosun/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bosun-monitor/bosun/downloads","issues_url":"https://api.github.com/repos/bosun-monitor/bosun/issues{/number}","pulls_url":"https://api.github.com/repos/bosun-monitor/bosun/pulls{/number}","milestones_url":"https://api.github.com/repos/bosun-monitor/bosun/milestones{/number}","notifications_url":"https://api.github.com/repos/bosun-monitor/bosun/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bosun-monitor/bosun/labels{/name}","releases_url":"https://api.github.com/repos/bosun-monitor/bosun/releases{/id}","created_at":"2013-11-15T00:12:27Z","updated_at":"2015-03-26T19:40:05Z","pushed_at":"2015-03-26T19:58:52Z","git_url":"git://github.com/bosun-monitor/bosun.git","ssh_url":"git@github.com:bosun-monitor/bosun.git","clone_url":"https://github.com/bosun-monitor/bosun.git","svn_url":"https://github.com/bosun-monitor/bosun","homepage":"http://bosun.org","size":24572,"stargazers_count":848,"watchers_count":848,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":93,"mirror_url":null,"open_issues_count":156,"forks":93,"open_issues":156,"watchers":848,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bosun-monitor/bosun/pulls/831"},"html":{"href":"https://github.com/bosun-monitor/bosun/pull/831"},"issue":{"href":"https://api.github.com/repos/bosun-monitor/bosun/issues/831"},"comments":{"href":"https://api.github.com/repos/bosun-monitor/bosun/issues/831/comments"},"review_comments":{"href":"https://api.github.com/repos/bosun-monitor/bosun/pulls/831/comments"},"review_comment":{"href":"https://api.github.com/repos/bosun-monitor/bosun/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bosun-monitor/bosun/pulls/831/commits"},"statuses":{"href":"https://api.github.com/repos/bosun-monitor/bosun/statuses/be63d7482b926cd5c438fa7bc883f934b6d4fe3a"}}}}