{"action":"created","comment":{"url":"https://api.github.com/repos/bosun-monitor/bosun/pulls/comments/34001907","id":34001907,"diff_hunk":"@@ -134,6 +142,12 @@ func c_procstats_linux() (opentsdb.MultiDataPoint, error) {\n \t\t\t\t\ttags[\"cpu\"] = tag_cpu\n \t\t\t\t}\n \t\t\t\tAdd(&md, \"linux.cpu\"+metric_percpu, value, tags, metadata.Counter, metadata.CHz, cpu_stat_desc[CPU_FIELDS[i]])\n+\n+\t\t\t\tvf, err := strconv.ParseFloat(value, 64)\n+\t\t\t\tif err != nil {\n+\t\t\t\t\treturn nil\n+\t\t\t\t}\n+\t\t\t\tAdd(&md, \"linux.percent_cpu\"+metric_percpu, vf/total_cpu*100.0, tags, metadata.Counter, metadata.Pct, cpu_stat_desc[CPU_FIELDS[i]])","path":"cmd/scollector/collectors/procstats_linux.go","position":31,"original_position":31,"commit_id":"5044d25c8f0b85dbcd2a974c6f2571ca464bdbf2","original_commit_id":"5044d25c8f0b85dbcd2a974c6f2571ca464bdbf2","user":{"login":"pdf","id":146192,"avatar_url":"https://avatars.githubusercontent.com/u/146192?v=3","gravatar_id":"","url":"https://api.github.com/users/pdf","html_url":"https://github.com/pdf","followers_url":"https://api.github.com/users/pdf/followers","following_url":"https://api.github.com/users/pdf/following{/other_user}","gists_url":"https://api.github.com/users/pdf/gists{/gist_id}","starred_url":"https://api.github.com/users/pdf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdf/subscriptions","organizations_url":"https://api.github.com/users/pdf/orgs","repos_url":"https://api.github.com/users/pdf/repos","events_url":"https://api.github.com/users/pdf/events{/privacy}","received_events_url":"https://api.github.com/users/pdf/received_events","type":"User","site_admin":false},"body":"So, with OpenTSDB, if I was to query a single tag value, it would convert that to a percentage of the sum of all tag values somehow?  I'm using InfluxDB.","created_at":"2015-07-07T01:46:38Z","updated_at":"2015-07-07T01:46:38Z","html_url":"https://github.com/bosun-monitor/bosun/pull/1138#discussion_r34001907","pull_request_url":"https://api.github.com/repos/bosun-monitor/bosun/pulls/1138","_links":{"self":{"href":"https://api.github.com/repos/bosun-monitor/bosun/pulls/comments/34001907"},"html":{"href":"https://github.com/bosun-monitor/bosun/pull/1138#discussion_r34001907"},"pull_request":{"href":"https://api.github.com/repos/bosun-monitor/bosun/pulls/1138"}}},"pull_request":{"url":"https://api.github.com/repos/bosun-monitor/bosun/pulls/1138","id":39142675,"html_url":"https://github.com/bosun-monitor/bosun/pull/1138","diff_url":"https://github.com/bosun-monitor/bosun/pull/1138.diff","patch_url":"https://github.com/bosun-monitor/bosun/pull/1138.patch","issue_url":"https://api.github.com/repos/bosun-monitor/bosun/issues/1138","number":1138,"state":"open","locked":false,"title":"cmd/scollector: Add linux.percent_cpu for easier reporting","user":{"login":"pdf","id":146192,"avatar_url":"https://avatars.githubusercontent.com/u/146192?v=3","gravatar_id":"","url":"https://api.github.com/users/pdf","html_url":"https://github.com/pdf","followers_url":"https://api.github.com/users/pdf/followers","following_url":"https://api.github.com/users/pdf/following{/other_user}","gists_url":"https://api.github.com/users/pdf/gists{/gist_id}","starred_url":"https://api.github.com/users/pdf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdf/subscriptions","organizations_url":"https://api.github.com/users/pdf/orgs","repos_url":"https://api.github.com/users/pdf/repos","events_url":"https://api.github.com/users/pdf/events{/privacy}","received_events_url":"https://api.github.com/users/pdf/received_events","type":"User","site_admin":false},"body":"We've found iowait and steal percentages to be useful alert metrics","created_at":"2015-07-03T03:00:16Z","updated_at":"2015-07-07T01:46:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c2c5b09a53a1bbf35dae780a27b259a357b0f1e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bosun-monitor/bosun/pulls/1138/commits","review_comments_url":"https://api.github.com/repos/bosun-monitor/bosun/pulls/1138/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/1138/comments","statuses_url":"https://api.github.com/repos/bosun-monitor/bosun/statuses/5044d25c8f0b85dbcd2a974c6f2571ca464bdbf2","head":{"label":"pdf:linux_cpu_percent","ref":"linux_cpu_percent","sha":"5044d25c8f0b85dbcd2a974c6f2571ca464bdbf2","user":{"login":"pdf","id":146192,"avatar_url":"https://avatars.githubusercontent.com/u/146192?v=3","gravatar_id":"","url":"https://api.github.com/users/pdf","html_url":"https://github.com/pdf","followers_url":"https://api.github.com/users/pdf/followers","following_url":"https://api.github.com/users/pdf/following{/other_user}","gists_url":"https://api.github.com/users/pdf/gists{/gist_id}","starred_url":"https://api.github.com/users/pdf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdf/subscriptions","organizations_url":"https://api.github.com/users/pdf/orgs","repos_url":"https://api.github.com/users/pdf/repos","events_url":"https://api.github.com/users/pdf/events{/privacy}","received_events_url":"https://api.github.com/users/pdf/received_events","type":"User","site_admin":false},"repo":{"id":38338987,"name":"bosun","full_name":"pdf/bosun","owner":{"login":"pdf","id":146192,"avatar_url":"https://avatars.githubusercontent.com/u/146192?v=3","gravatar_id":"","url":"https://api.github.com/users/pdf","html_url":"https://github.com/pdf","followers_url":"https://api.github.com/users/pdf/followers","following_url":"https://api.github.com/users/pdf/following{/other_user}","gists_url":"https://api.github.com/users/pdf/gists{/gist_id}","starred_url":"https://api.github.com/users/pdf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdf/subscriptions","organizations_url":"https://api.github.com/users/pdf/orgs","repos_url":"https://api.github.com/users/pdf/repos","events_url":"https://api.github.com/users/pdf/events{/privacy}","received_events_url":"https://api.github.com/users/pdf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pdf/bosun","description":"Time Series Alerting Framework","fork":true,"url":"https://api.github.com/repos/pdf/bosun","forks_url":"https://api.github.com/repos/pdf/bosun/forks","keys_url":"https://api.github.com/repos/pdf/bosun/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pdf/bosun/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pdf/bosun/teams","hooks_url":"https://api.github.com/repos/pdf/bosun/hooks","issue_events_url":"https://api.github.com/repos/pdf/bosun/issues/events{/number}","events_url":"https://api.github.com/repos/pdf/bosun/events","assignees_url":"https://api.github.com/repos/pdf/bosun/assignees{/user}","branches_url":"https://api.github.com/repos/pdf/bosun/branches{/branch}","tags_url":"https://api.github.com/repos/pdf/bosun/tags","blobs_url":"https://api.github.com/repos/pdf/bosun/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pdf/bosun/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pdf/bosun/git/refs{/sha}","trees_url":"https://api.github.com/repos/pdf/bosun/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pdf/bosun/statuses/{sha}","languages_url":"https://api.github.com/repos/pdf/bosun/languages","stargazers_url":"https://api.github.com/repos/pdf/bosun/stargazers","contributors_url":"https://api.github.com/repos/pdf/bosun/contributors","subscribers_url":"https://api.github.com/repos/pdf/bosun/subscribers","subscription_url":"https://api.github.com/repos/pdf/bosun/subscription","commits_url":"https://api.github.com/repos/pdf/bosun/commits{/sha}","git_commits_url":"https://api.github.com/repos/pdf/bosun/git/commits{/sha}","comments_url":"https://api.github.com/repos/pdf/bosun/comments{/number}","issue_comment_url":"https://api.github.com/repos/pdf/bosun/issues/comments{/number}","contents_url":"https://api.github.com/repos/pdf/bosun/contents/{+path}","compare_url":"https://api.github.com/repos/pdf/bosun/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pdf/bosun/merges","archive_url":"https://api.github.com/repos/pdf/bosun/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pdf/bosun/downloads","issues_url":"https://api.github.com/repos/pdf/bosun/issues{/number}","pulls_url":"https://api.github.com/repos/pdf/bosun/pulls{/number}","milestones_url":"https://api.github.com/repos/pdf/bosun/milestones{/number}","notifications_url":"https://api.github.com/repos/pdf/bosun/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pdf/bosun/labels{/name}","releases_url":"https://api.github.com/repos/pdf/bosun/releases{/id}","created_at":"2015-06-30T23:49:31Z","updated_at":"2015-06-30T23:49:32Z","pushed_at":"2015-07-03T03:04:16Z","git_url":"git://github.com/pdf/bosun.git","ssh_url":"git@github.com:pdf/bosun.git","clone_url":"https://github.com/pdf/bosun.git","svn_url":"https://github.com/pdf/bosun","homepage":"http://bosun.org","size":18436,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"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":"065bfab3ec3f25a9d9b6a2db0af2fadcc12f75d8","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-07-06T23:57:24Z","pushed_at":"2015-07-06T20:05:09Z","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":42088,"stargazers_count":981,"watchers_count":981,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":119,"mirror_url":null,"open_issues_count":191,"forks":119,"open_issues":191,"watchers":981,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bosun-monitor/bosun/pulls/1138"},"html":{"href":"https://github.com/bosun-monitor/bosun/pull/1138"},"issue":{"href":"https://api.github.com/repos/bosun-monitor/bosun/issues/1138"},"comments":{"href":"https://api.github.com/repos/bosun-monitor/bosun/issues/1138/comments"},"review_comments":{"href":"https://api.github.com/repos/bosun-monitor/bosun/pulls/1138/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/1138/commits"},"statuses":{"href":"https://api.github.com/repos/bosun-monitor/bosun/statuses/5044d25c8f0b85dbcd2a974c6f2571ca464bdbf2"}}}}