{"action":"created","issue":{"url":"https://api.github.com/repos/guardian/alerta/issues/318","repository_url":"https://api.github.com/repos/guardian/alerta","labels_url":"https://api.github.com/repos/guardian/alerta/issues/318/labels{/name}","comments_url":"https://api.github.com/repos/guardian/alerta/issues/318/comments","events_url":"https://api.github.com/repos/guardian/alerta/issues/318/events","html_url":"https://github.com/guardian/alerta/pull/318","id":197646704,"number":318,"title":"Added a Riemann webhook","user":{"login":"jamtur01","id":4365,"avatar_url":"https://avatars.githubusercontent.com/u/4365?v=3","gravatar_id":"","url":"https://api.github.com/users/jamtur01","html_url":"https://github.com/jamtur01","followers_url":"https://api.github.com/users/jamtur01/followers","following_url":"https://api.github.com/users/jamtur01/following{/other_user}","gists_url":"https://api.github.com/users/jamtur01/gists{/gist_id}","starred_url":"https://api.github.com/users/jamtur01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamtur01/subscriptions","organizations_url":"https://api.github.com/users/jamtur01/orgs","repos_url":"https://api.github.com/users/jamtur01/repos","events_url":"https://api.github.com/users/jamtur01/events{/privacy}","received_events_url":"https://api.github.com/users/jamtur01/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-27T05:05:12Z","updated_at":"2016-12-27T13:03:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/guardian/alerta/pulls/318","html_url":"https://github.com/guardian/alerta/pull/318","diff_url":"https://github.com/guardian/alerta/pull/318.diff","patch_url":"https://github.com/guardian/alerta/pull/318.patch"},"body":"Adds a webhook for Riemann. Makes no assumptions about the format of\r\nyour Riemann events and consumes standard events. If events are\r\ndecorated with additional metadata: tags, environment, group, etc then\r\nthese will be used.\r\n\r\n```python\r\nreturn Alert(\r\n        resource='%s-%s' % (alert['host'], alert['service']),\r\n        event=alert['service'],\r\n        environment=alert.get('environment', 'Production'),\r\n        severity=alert.get('state', 'unknown'),\r\n        status=alert.get('state', 'unknown'),\r\n        service=[alert['service']],\r\n        group=alert.get('group', 'Performance'),\r\n        text=alert.get('description', None),\r\n        value=alert.get('metric', None),\r\n        tags=alert.get('tags', None),\r\n        origin='Riemann',\r\n        raw_data=alert\r\n    )\r\n```\r\n\r\nAdded a test too."},"comment":{"url":"https://api.github.com/repos/guardian/alerta/issues/comments/269323187","html_url":"https://github.com/guardian/alerta/pull/318#issuecomment-269323187","issue_url":"https://api.github.com/repos/guardian/alerta/issues/318","id":269323187,"user":{"login":"jamtur01","id":4365,"avatar_url":"https://avatars.githubusercontent.com/u/4365?v=3","gravatar_id":"","url":"https://api.github.com/users/jamtur01","html_url":"https://github.com/jamtur01","followers_url":"https://api.github.com/users/jamtur01/followers","following_url":"https://api.github.com/users/jamtur01/following{/other_user}","gists_url":"https://api.github.com/users/jamtur01/gists{/gist_id}","starred_url":"https://api.github.com/users/jamtur01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamtur01/subscriptions","organizations_url":"https://api.github.com/users/jamtur01/orgs","repos_url":"https://api.github.com/users/jamtur01/repos","events_url":"https://api.github.com/users/jamtur01/events{/privacy}","received_events_url":"https://api.github.com/users/jamtur01/received_events","type":"User","site_admin":false},"created_at":"2016-12-27T13:03:10Z","updated_at":"2016-12-27T13:03:10Z","body":"Ah the server setting it part I missed. Will update shortly. Thanks. :) "}}
{"actor":{"display_login":"jamtur01"}}