{"action":"created","comment":{"url":"https://api.github.com/repos/prometheus/memcached_exporter/pulls/comments/83296931","pull_request_review_id":4150885,"id":83296931,"diff_hunk":"@@ -204,6 +374,54 @@ func (e *Exporter) Collect(ch chan<- prometheus.Metric) {\n \n \t\tch <- prometheus.MustNewConstMetric(e.evictions, prometheus.CounterValue, parse(s, \"evictions\"))\n \t\tch <- prometheus.MustNewConstMetric(e.reclaimed, prometheus.CounterValue, parse(s, \"reclaimed\"))\n+\n+\t\tch <- prometheus.MustNewConstMetric(e.malloced, prometheus.GaugeValue, parse(s, \"total_malloced\"))\n+\n+\t\tfor slab, u := range t.Items {\n+\t\t\tslab := strconv.Itoa(slab)\n+\t\t\tch <- prometheus.MustNewConstMetric(e.itemsNumber, prometheus.GaugeValue, parse(u, \"number\"), slab)\n+\t\t\tch <- prometheus.MustNewConstMetric(e.itemsAge, prometheus.CounterValue, parse(u, \"age\"), slab)\n+\t\t\tch <- prometheus.MustNewConstMetric(e.itemsCrawlerReclaimed, prometheus.CounterValue, parse(u, \"crawler_reclaimed\"), slab)\n+\t\t\tch <- prometheus.MustNewConstMetric(e.itemsEvicted, prometheus.CounterValue, parse(u, \"evicted\"), slab)\n+\t\t\tch <- prometheus.MustNewConstMetric(e.itemsEvictedNonzero, prometheus.CounterValue, parse(u, \"evicted_nonzero\"), slab)\n+\t\t\tch <- prometheus.MustNewConstMetric(e.itemsEvictedTime, prometheus.CounterValue, parse(u, \"evicted_time\"), slab)\n+\t\t\tch <- prometheus.MustNewConstMetric(e.itemsEvictedUnfetched, prometheus.CounterValue, parse(u, \"evicted_unfetched\"), slab)\n+\t\t\tch <- prometheus.MustNewConstMetric(e.itemsExpiredUnfetched, prometheus.CounterValue, parse(u, \"expired_unfetched\"), slab)\n+\t\t\tch <- prometheus.MustNewConstMetric(e.itemsOutofmemory, prometheus.CounterValue, parse(u, \"outofmemory\"), slab)\n+\t\t\tch <- prometheus.MustNewConstMetric(e.itemsReclaimed, prometheus.CounterValue, parse(u, \"reclaimed\"), slab)\n+\t\t\tch <- prometheus.MustNewConstMetric(e.itemsTailrepairs, prometheus.CounterValue, parse(u, \"tailrepairs\"), slab)\n+\t\t}\n+\n+\t\tfor slab, v := range t.Slabs {\n+\t\t\tslab := strconv.Itoa(slab)\n+\n+\t\t\tfor _, op := range []string{\"get\", \"delete\", \"incr\", \"decr\", \"cas\", \"touch\"} {\n+\t\t\t\tch <- prometheus.MustNewConstMetric(e.slabsCommands, prometheus.CounterValue, parse(v, op+\"_hits\"), slab, op, \"hit\")\n+\t\t\t}\n+\t\t\tch <- prometheus.MustNewConstMetric(e.slabsCommands, prometheus.CounterValue, parse(v, \"cas_badval\"), slab, \"cas\", \"badval\")\n+\n+\t\t\tslabSet := math.NaN()\n+\t\t\tif slabSetCmd, err := strconv.ParseFloat(v[\"cmd_set\"], 64); err == nil {\n+\t\t\t\tif cas, casErr := sum(s, \"cas_misses\", \"cas_hits\", \"cas_badval\"); casErr == nil {","path":"main.go","position":272,"original_position":272,"commit_id":"b43a2c552b8bc73ec3ed14f8fe3966389678424d","original_commit_id":"b43a2c552b8bc73ec3ed14f8fe3966389678424d","user":{"login":"grobie","id":3432,"avatar_url":"https://avatars.githubusercontent.com/u/3432?v=3","gravatar_id":"","url":"https://api.github.com/users/grobie","html_url":"https://github.com/grobie","followers_url":"https://api.github.com/users/grobie/followers","following_url":"https://api.github.com/users/grobie/following{/other_user}","gists_url":"https://api.github.com/users/grobie/gists{/gist_id}","starred_url":"https://api.github.com/users/grobie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grobie/subscriptions","organizations_url":"https://api.github.com/users/grobie/orgs","repos_url":"https://api.github.com/users/grobie/repos","events_url":"https://api.github.com/users/grobie/events{/privacy}","received_events_url":"https://api.github.com/users/grobie/received_events","type":"User","site_admin":false},"body":"This needs to be `v`. `s` references the global stats.","created_at":"2016-10-13T19:49:41Z","updated_at":"2016-10-13T19:50:16Z","html_url":"https://github.com/prometheus/memcached_exporter/pull/11#discussion_r83296931","pull_request_url":"https://api.github.com/repos/prometheus/memcached_exporter/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/prometheus/memcached_exporter/pulls/comments/83296931"},"html":{"href":"https://github.com/prometheus/memcached_exporter/pull/11#discussion_r83296931"},"pull_request":{"href":"https://api.github.com/repos/prometheus/memcached_exporter/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/prometheus/memcached_exporter/pulls/11","id":88094168,"html_url":"https://github.com/prometheus/memcached_exporter/pull/11","diff_url":"https://github.com/prometheus/memcached_exporter/pull/11.diff","patch_url":"https://github.com/prometheus/memcached_exporter/pull/11.patch","issue_url":"https://api.github.com/repos/prometheus/memcached_exporter/issues/11","number":11,"state":"open","locked":false,"title":"Adding slab metrics","user":{"login":"ipstatic","id":332617,"avatar_url":"https://avatars.githubusercontent.com/u/332617?v=3","gravatar_id":"","url":"https://api.github.com/users/ipstatic","html_url":"https://github.com/ipstatic","followers_url":"https://api.github.com/users/ipstatic/followers","following_url":"https://api.github.com/users/ipstatic/following{/other_user}","gists_url":"https://api.github.com/users/ipstatic/gists{/gist_id}","starred_url":"https://api.github.com/users/ipstatic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipstatic/subscriptions","organizations_url":"https://api.github.com/users/ipstatic/orgs","repos_url":"https://api.github.com/users/ipstatic/repos","events_url":"https://api.github.com/users/ipstatic/events{/privacy}","received_events_url":"https://api.github.com/users/ipstatic/received_events","type":"User","site_admin":false},"body":"This resolves #2 by porting @jjneely PR from the original exporter ([PR here](https://github.com/snapbug/memcache_exporter/pull/7)). Please note I did have to rename two metrics as they would collide with the item names being added (items_evicted_total and items_reclaimed_total). If this is an issue please let me know.","created_at":"2016-10-05T14:55:09Z","updated_at":"2016-10-13T19:50:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0e429c42b088390fe8198645c6ec55607f096b54","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/prometheus/memcached_exporter/pulls/11/commits","review_comments_url":"https://api.github.com/repos/prometheus/memcached_exporter/pulls/11/comments","review_comment_url":"https://api.github.com/repos/prometheus/memcached_exporter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prometheus/memcached_exporter/issues/11/comments","statuses_url":"https://api.github.com/repos/prometheus/memcached_exporter/statuses/b43a2c552b8bc73ec3ed14f8fe3966389678424d","head":{"label":"ipstatic:adding-slab-metrics","ref":"adding-slab-metrics","sha":"b43a2c552b8bc73ec3ed14f8fe3966389678424d","user":{"login":"ipstatic","id":332617,"avatar_url":"https://avatars.githubusercontent.com/u/332617?v=3","gravatar_id":"","url":"https://api.github.com/users/ipstatic","html_url":"https://github.com/ipstatic","followers_url":"https://api.github.com/users/ipstatic/followers","following_url":"https://api.github.com/users/ipstatic/following{/other_user}","gists_url":"https://api.github.com/users/ipstatic/gists{/gist_id}","starred_url":"https://api.github.com/users/ipstatic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipstatic/subscriptions","organizations_url":"https://api.github.com/users/ipstatic/orgs","repos_url":"https://api.github.com/users/ipstatic/repos","events_url":"https://api.github.com/users/ipstatic/events{/privacy}","received_events_url":"https://api.github.com/users/ipstatic/received_events","type":"User","site_admin":false},"repo":{"id":69616359,"name":"memcached_exporter","full_name":"ipstatic/memcached_exporter","owner":{"login":"ipstatic","id":332617,"avatar_url":"https://avatars.githubusercontent.com/u/332617?v=3","gravatar_id":"","url":"https://api.github.com/users/ipstatic","html_url":"https://github.com/ipstatic","followers_url":"https://api.github.com/users/ipstatic/followers","following_url":"https://api.github.com/users/ipstatic/following{/other_user}","gists_url":"https://api.github.com/users/ipstatic/gists{/gist_id}","starred_url":"https://api.github.com/users/ipstatic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipstatic/subscriptions","organizations_url":"https://api.github.com/users/ipstatic/orgs","repos_url":"https://api.github.com/users/ipstatic/repos","events_url":"https://api.github.com/users/ipstatic/events{/privacy}","received_events_url":"https://api.github.com/users/ipstatic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ipstatic/memcached_exporter","description":"Exports metrics from memcached servers for consumption by Prometheus.","fork":true,"url":"https://api.github.com/repos/ipstatic/memcached_exporter","forks_url":"https://api.github.com/repos/ipstatic/memcached_exporter/forks","keys_url":"https://api.github.com/repos/ipstatic/memcached_exporter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ipstatic/memcached_exporter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ipstatic/memcached_exporter/teams","hooks_url":"https://api.github.com/repos/ipstatic/memcached_exporter/hooks","issue_events_url":"https://api.github.com/repos/ipstatic/memcached_exporter/issues/events{/number}","events_url":"https://api.github.com/repos/ipstatic/memcached_exporter/events","assignees_url":"https://api.github.com/repos/ipstatic/memcached_exporter/assignees{/user}","branches_url":"https://api.github.com/repos/ipstatic/memcached_exporter/branches{/branch}","tags_url":"https://api.github.com/repos/ipstatic/memcached_exporter/tags","blobs_url":"https://api.github.com/repos/ipstatic/memcached_exporter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ipstatic/memcached_exporter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ipstatic/memcached_exporter/git/refs{/sha}","trees_url":"https://api.github.com/repos/ipstatic/memcached_exporter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ipstatic/memcached_exporter/statuses/{sha}","languages_url":"https://api.github.com/repos/ipstatic/memcached_exporter/languages","stargazers_url":"https://api.github.com/repos/ipstatic/memcached_exporter/stargazers","contributors_url":"https://api.github.com/repos/ipstatic/memcached_exporter/contributors","subscribers_url":"https://api.github.com/repos/ipstatic/memcached_exporter/subscribers","subscription_url":"https://api.github.com/repos/ipstatic/memcached_exporter/subscription","commits_url":"https://api.github.com/repos/ipstatic/memcached_exporter/commits{/sha}","git_commits_url":"https://api.github.com/repos/ipstatic/memcached_exporter/git/commits{/sha}","comments_url":"https://api.github.com/repos/ipstatic/memcached_exporter/comments{/number}","issue_comment_url":"https://api.github.com/repos/ipstatic/memcached_exporter/issues/comments{/number}","contents_url":"https://api.github.com/repos/ipstatic/memcached_exporter/contents/{+path}","compare_url":"https://api.github.com/repos/ipstatic/memcached_exporter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ipstatic/memcached_exporter/merges","archive_url":"https://api.github.com/repos/ipstatic/memcached_exporter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ipstatic/memcached_exporter/downloads","issues_url":"https://api.github.com/repos/ipstatic/memcached_exporter/issues{/number}","pulls_url":"https://api.github.com/repos/ipstatic/memcached_exporter/pulls{/number}","milestones_url":"https://api.github.com/repos/ipstatic/memcached_exporter/milestones{/number}","notifications_url":"https://api.github.com/repos/ipstatic/memcached_exporter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ipstatic/memcached_exporter/labels{/name}","releases_url":"https://api.github.com/repos/ipstatic/memcached_exporter/releases{/id}","deployments_url":"https://api.github.com/repos/ipstatic/memcached_exporter/deployments","created_at":"2016-09-29T23:36:22Z","updated_at":"2016-09-29T23:36:23Z","pushed_at":"2016-10-11T20:01:38Z","git_url":"git://github.com/ipstatic/memcached_exporter.git","ssh_url":"git@github.com:ipstatic/memcached_exporter.git","clone_url":"https://github.com/ipstatic/memcached_exporter.git","svn_url":"https://github.com/ipstatic/memcached_exporter","homepage":null,"size":945,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"prometheus:master","ref":"master","sha":"65125fd93d3cd124498649970748a47f9e1a5f3c","user":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"repo":{"id":57182606,"name":"memcached_exporter","full_name":"prometheus/memcached_exporter","owner":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prometheus/memcached_exporter","description":"Exports metrics from memcached servers for consumption by Prometheus.","fork":false,"url":"https://api.github.com/repos/prometheus/memcached_exporter","forks_url":"https://api.github.com/repos/prometheus/memcached_exporter/forks","keys_url":"https://api.github.com/repos/prometheus/memcached_exporter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prometheus/memcached_exporter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prometheus/memcached_exporter/teams","hooks_url":"https://api.github.com/repos/prometheus/memcached_exporter/hooks","issue_events_url":"https://api.github.com/repos/prometheus/memcached_exporter/issues/events{/number}","events_url":"https://api.github.com/repos/prometheus/memcached_exporter/events","assignees_url":"https://api.github.com/repos/prometheus/memcached_exporter/assignees{/user}","branches_url":"https://api.github.com/repos/prometheus/memcached_exporter/branches{/branch}","tags_url":"https://api.github.com/repos/prometheus/memcached_exporter/tags","blobs_url":"https://api.github.com/repos/prometheus/memcached_exporter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prometheus/memcached_exporter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prometheus/memcached_exporter/git/refs{/sha}","trees_url":"https://api.github.com/repos/prometheus/memcached_exporter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prometheus/memcached_exporter/statuses/{sha}","languages_url":"https://api.github.com/repos/prometheus/memcached_exporter/languages","stargazers_url":"https://api.github.com/repos/prometheus/memcached_exporter/stargazers","contributors_url":"https://api.github.com/repos/prometheus/memcached_exporter/contributors","subscribers_url":"https://api.github.com/repos/prometheus/memcached_exporter/subscribers","subscription_url":"https://api.github.com/repos/prometheus/memcached_exporter/subscription","commits_url":"https://api.github.com/repos/prometheus/memcached_exporter/commits{/sha}","git_commits_url":"https://api.github.com/repos/prometheus/memcached_exporter/git/commits{/sha}","comments_url":"https://api.github.com/repos/prometheus/memcached_exporter/comments{/number}","issue_comment_url":"https://api.github.com/repos/prometheus/memcached_exporter/issues/comments{/number}","contents_url":"https://api.github.com/repos/prometheus/memcached_exporter/contents/{+path}","compare_url":"https://api.github.com/repos/prometheus/memcached_exporter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prometheus/memcached_exporter/merges","archive_url":"https://api.github.com/repos/prometheus/memcached_exporter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prometheus/memcached_exporter/downloads","issues_url":"https://api.github.com/repos/prometheus/memcached_exporter/issues{/number}","pulls_url":"https://api.github.com/repos/prometheus/memcached_exporter/pulls{/number}","milestones_url":"https://api.github.com/repos/prometheus/memcached_exporter/milestones{/number}","notifications_url":"https://api.github.com/repos/prometheus/memcached_exporter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prometheus/memcached_exporter/labels{/name}","releases_url":"https://api.github.com/repos/prometheus/memcached_exporter/releases{/id}","deployments_url":"https://api.github.com/repos/prometheus/memcached_exporter/deployments","created_at":"2016-04-27T04:10:47Z","updated_at":"2016-09-19T12:03:06Z","pushed_at":"2016-10-11T20:01:38Z","git_url":"git://github.com/prometheus/memcached_exporter.git","ssh_url":"git@github.com:prometheus/memcached_exporter.git","clone_url":"https://github.com/prometheus/memcached_exporter.git","svn_url":"https://github.com/prometheus/memcached_exporter","homepage":null,"size":933,"stargazers_count":4,"watchers_count":4,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prometheus/memcached_exporter/pulls/11"},"html":{"href":"https://github.com/prometheus/memcached_exporter/pull/11"},"issue":{"href":"https://api.github.com/repos/prometheus/memcached_exporter/issues/11"},"comments":{"href":"https://api.github.com/repos/prometheus/memcached_exporter/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/prometheus/memcached_exporter/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/prometheus/memcached_exporter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prometheus/memcached_exporter/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/prometheus/memcached_exporter/statuses/b43a2c552b8bc73ec3ed14f8fe3966389678424d"}}}}
{"actor":{"display_login":"grobie"}}