{"action":"closed","number":20,"pull_request":{"url":"https://api.github.com/repos/Financial-Times/n-health/pulls/20","id":72906826,"html_url":"https://github.com/Financial-Times/n-health/pull/20","diff_url":"https://github.com/Financial-Times/n-health/pull/20.diff","patch_url":"https://github.com/Financial-Times/n-health/pull/20.patch","issue_url":"https://api.github.com/repos/Financial-Times/n-health/issues/20","number":20,"state":"closed","locked":false,"title":"fix: manually summarise datapoints for graphiteWorking check","user":{"login":"keithamus","id":118266,"avatar_url":"https://avatars.githubusercontent.com/u/118266?v=3","gravatar_id":"","url":"https://api.github.com/users/keithamus","html_url":"https://github.com/keithamus","followers_url":"https://api.github.com/users/keithamus/followers","following_url":"https://api.github.com/users/keithamus/following{/other_user}","gists_url":"https://api.github.com/users/keithamus/gists{/gist_id}","starred_url":"https://api.github.com/users/keithamus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keithamus/subscriptions","organizations_url":"https://api.github.com/users/keithamus/orgs","repos_url":"https://api.github.com/users/keithamus/repos","events_url":"https://api.github.com/users/keithamus/events{/privacy}","received_events_url":"https://api.github.com/users/keithamus/received_events","type":"User","site_admin":false},"body":"Using graphite's `summarize` function gives you 2 datapoints, one for the left-most part of the axis\r\nand the other for the right-most. These are averaged out to give a straight line on a graph, but don't\r\nrepresent accurate values, for example if the latest value is 0 but the rest are high, you won't see\r\nthe dropoff using `summarize` until the high data is over the bounds of the average. Conversely, if its\r\nat 0 for a while, and new non-zeo data comes in, again this won't be visible or accurate for a while.\r\n\r\nThe purpose of this healthcheck is to simply check if the latest entries are non-zero. So we can potentially\r\njust get the latest value in the timeseries and check that... a small problem herein lies that the data\r\nin graphite can be out of sync from real world. From eye balling as much as 7 minute delays before it\r\nstarts backfilling data.\r\n\r\nBecause of this, the function has now been changed to get the last 10 minutes worth of data, sum this up\r\nin JS and getting the grand total number of requests over the last 10 minutes. If _that_ number is 0 then\r\nwe have a problem. This means we'll know about failures 10 minutes after they happen. 10 minutes seems\r\nlike a long time but it is a trade off between long times knowing about failure vs lots of erroneous false\r\npositives (or negatives?).","created_at":"2016-06-07T16:27:18Z","updated_at":"2016-06-10T09:06:45Z","closed_at":"2016-06-10T09:06:45Z","merged_at":"2016-06-10T09:06:45Z","merge_commit_sha":"cf04204dcd47bf50e2d7247321441d6a6665bd62","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Financial-Times/n-health/pulls/20/commits","review_comments_url":"https://api.github.com/repos/Financial-Times/n-health/pulls/20/comments","review_comment_url":"https://api.github.com/repos/Financial-Times/n-health/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Financial-Times/n-health/issues/20/comments","statuses_url":"https://api.github.com/repos/Financial-Times/n-health/statuses/8249447e499d48b4436dbfaa0c3db4954489bc55","head":{"label":"Financial-Times:fix-graphite-working-check-sum-last-10m","ref":"fix-graphite-working-check-sum-last-10m","sha":"8249447e499d48b4436dbfaa0c3db4954489bc55","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":43944333,"name":"n-health","full_name":"Financial-Times/n-health","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/n-health","description":"Makes it easy to add healthchecks to an app","fork":false,"url":"https://api.github.com/repos/Financial-Times/n-health","forks_url":"https://api.github.com/repos/Financial-Times/n-health/forks","keys_url":"https://api.github.com/repos/Financial-Times/n-health/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/n-health/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/n-health/teams","hooks_url":"https://api.github.com/repos/Financial-Times/n-health/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/n-health/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/n-health/events","assignees_url":"https://api.github.com/repos/Financial-Times/n-health/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/n-health/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/n-health/tags","blobs_url":"https://api.github.com/repos/Financial-Times/n-health/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/n-health/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/n-health/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/n-health/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/n-health/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/n-health/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/n-health/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/n-health/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/n-health/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/n-health/subscription","commits_url":"https://api.github.com/repos/Financial-Times/n-health/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/n-health/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/n-health/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/n-health/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/n-health/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/n-health/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/n-health/merges","archive_url":"https://api.github.com/repos/Financial-Times/n-health/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/n-health/downloads","issues_url":"https://api.github.com/repos/Financial-Times/n-health/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/n-health/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/n-health/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/n-health/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/n-health/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/n-health/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/n-health/deployments","created_at":"2015-10-09T08:57:49Z","updated_at":"2016-02-26T12:44:45Z","pushed_at":"2016-06-10T09:06:45Z","git_url":"git://github.com/Financial-Times/n-health.git","ssh_url":"git@github.com:Financial-Times/n-health.git","clone_url":"https://github.com/Financial-Times/n-health.git","svn_url":"https://github.com/Financial-Times/n-health","homepage":null,"size":86,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"Financial-Times:master","ref":"master","sha":"296c1e2932e5c4e93cdf844b980408b2924e8166","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":43944333,"name":"n-health","full_name":"Financial-Times/n-health","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/n-health","description":"Makes it easy to add healthchecks to an app","fork":false,"url":"https://api.github.com/repos/Financial-Times/n-health","forks_url":"https://api.github.com/repos/Financial-Times/n-health/forks","keys_url":"https://api.github.com/repos/Financial-Times/n-health/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/n-health/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/n-health/teams","hooks_url":"https://api.github.com/repos/Financial-Times/n-health/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/n-health/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/n-health/events","assignees_url":"https://api.github.com/repos/Financial-Times/n-health/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/n-health/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/n-health/tags","blobs_url":"https://api.github.com/repos/Financial-Times/n-health/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/n-health/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/n-health/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/n-health/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/n-health/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/n-health/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/n-health/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/n-health/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/n-health/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/n-health/subscription","commits_url":"https://api.github.com/repos/Financial-Times/n-health/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/n-health/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/n-health/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/n-health/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/n-health/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/n-health/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/n-health/merges","archive_url":"https://api.github.com/repos/Financial-Times/n-health/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/n-health/downloads","issues_url":"https://api.github.com/repos/Financial-Times/n-health/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/n-health/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/n-health/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/n-health/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/n-health/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/n-health/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/n-health/deployments","created_at":"2015-10-09T08:57:49Z","updated_at":"2016-02-26T12:44:45Z","pushed_at":"2016-06-10T09:06:45Z","git_url":"git://github.com/Financial-Times/n-health.git","ssh_url":"git@github.com:Financial-Times/n-health.git","clone_url":"https://github.com/Financial-Times/n-health.git","svn_url":"https://github.com/Financial-Times/n-health","homepage":null,"size":86,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/n-health/pulls/20"},"html":{"href":"https://github.com/Financial-Times/n-health/pull/20"},"issue":{"href":"https://api.github.com/repos/Financial-Times/n-health/issues/20"},"comments":{"href":"https://api.github.com/repos/Financial-Times/n-health/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/Financial-Times/n-health/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/Financial-Times/n-health/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Financial-Times/n-health/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/Financial-Times/n-health/statuses/8249447e499d48b4436dbfaa0c3db4954489bc55"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"keithamus","id":118266,"avatar_url":"https://avatars.githubusercontent.com/u/118266?v=3","gravatar_id":"","url":"https://api.github.com/users/keithamus","html_url":"https://github.com/keithamus","followers_url":"https://api.github.com/users/keithamus/followers","following_url":"https://api.github.com/users/keithamus/following{/other_user}","gists_url":"https://api.github.com/users/keithamus/gists{/gist_id}","starred_url":"https://api.github.com/users/keithamus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keithamus/subscriptions","organizations_url":"https://api.github.com/users/keithamus/orgs","repos_url":"https://api.github.com/users/keithamus/repos","events_url":"https://api.github.com/users/keithamus/events{/privacy}","received_events_url":"https://api.github.com/users/keithamus/received_events","type":"User","site_admin":false},"comments":5,"review_comments":0,"commits":1,"additions":28,"deletions":28,"changed_files":2}}
{"actor":{"display_login":"keithamus"}}