{"action":"created","issue":{"url":"https://api.github.com/repos/sensu/sensu/issues/1273","repository_url":"https://api.github.com/repos/sensu/sensu","labels_url":"https://api.github.com/repos/sensu/sensu/issues/1273/labels{/name}","comments_url":"https://api.github.com/repos/sensu/sensu/issues/1273/comments","events_url":"https://api.github.com/repos/sensu/sensu/issues/1273/events","html_url":"https://github.com/sensu/sensu/pull/1273","id":155812458,"number":1273,"title":"Aggregates 2.0","user":{"login":"portertech","id":149630,"avatar_url":"https://avatars.githubusercontent.com/u/149630?v=3","gravatar_id":"","url":"https://api.github.com/users/portertech","html_url":"https://github.com/portertech","followers_url":"https://api.github.com/users/portertech/followers","following_url":"https://api.github.com/users/portertech/following{/other_user}","gists_url":"https://api.github.com/users/portertech/gists{/gist_id}","starred_url":"https://api.github.com/users/portertech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/portertech/subscriptions","organizations_url":"https://api.github.com/users/portertech/orgs","repos_url":"https://api.github.com/users/portertech/repos","events_url":"https://api.github.com/users/portertech/events{/privacy}","received_events_url":"https://api.github.com/users/portertech/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-05-19T19:10:28Z","updated_at":"2016-06-10T03:15:51Z","closed_at":"2016-05-25T22:28:06Z","pull_request":{"url":"https://api.github.com/repos/sensu/sensu/pulls/1273","html_url":"https://github.com/sensu/sensu/pull/1273","diff_url":"https://github.com/sensu/sensu/pull/1273.diff","patch_url":"https://github.com/sensu/sensu/pull/1273.patch"},"body":"Implementing https://github.com/sensu/sensu/issues/1218\r\n\r\n- `/aggregates`\r\n\r\n```\r\n[\r\n  {\"name\": \"check_http\"},\r\n  {\"name\": \"check_web_app\"},\r\n  {\"name\": \"elasticsearch_health\"}\r\n]\r\n```\r\n\r\n- `/aggregates/elasticsearch_health`\r\n\r\n```\r\n{\r\n  \"clients\": 15,\r\n  \"checks\": 2,\r\n  \"results\": {\r\n    \"ok\": 18,\r\n    \"warning\": 0,\r\n    \"critical\": 1,\r\n    \"unknown\": 0,\r\n    \"total\": 19,\r\n    \"stale\": 0\r\n  }\r\n}\r\n```\r\n- `/aggregates/elasticsearch_health?max_age=120`\r\n\r\n```\r\n{\r\n  \"clients\": 15,\r\n  \"checks\": 1,\r\n  \"results\": {\r\n    \"ok\": 18,\r\n    \"warning\": 0,\r\n    \"critical\": 0,\r\n    \"unknown\": 0,\r\n    \"total\": 19,\r\n    \"stale\": 1\r\n  }\r\n}\r\n```\r\n\r\n- `/aggregates/elasticsearch_health/clients`\r\n\r\n```\r\n[\r\n  {\"name\": \"1-424242\", \"checks\": [\"elasticsearch_service\",\"elasticsearch_cluster_health\"]},\r\n  {...}\r\n]\r\n```\r\n\r\n- `/aggregates/elasticsearch_health/checks`\r\n\r\n```\r\n[\r\n  {\"name\": \"elasticsearch_service\", \"clients\": [\"1-424242\",\"i-424243\", ...]},\r\n  {\"name\": \"elasticsearch_cluster_health\", \"clients\": [\"1-424242\"]},\r\n  {...}\r\n]\r\n```\r\n\r\n- `/aggregates/elasticsearch_health/results/critical`\r\n\r\n```\r\n[\r\n  {\r\n    \"check\": \"elasticsearch_cluster_health\", \r\n    \"summary\": [\r\n      {\r\n        \"output\": \"Everything is Broken\", \r\n        \"total\": 1, \r\n        \"clients\": [\"i-424242\"]\r\n      }\r\n    ]\r\n  }\r\n]\r\n```\r\n\r\n- `/aggregates/elasticsearch_health/results/critical?max_age=120`\r\n\r\n```\r\n[]\r\n```\r\n\r\n![1082](https://cloud.githubusercontent.com/assets/149630/15409372/58df0512-1dc9-11e6-95b1-a1a92662662c.gif)\r\n"},"comment":{"url":"https://api.github.com/repos/sensu/sensu/issues/comments/225083971","html_url":"https://github.com/sensu/sensu/pull/1273#issuecomment-225083971","issue_url":"https://api.github.com/repos/sensu/sensu/issues/1273","id":225083971,"user":{"login":"fessyfoo","id":1090063,"avatar_url":"https://avatars.githubusercontent.com/u/1090063?v=3","gravatar_id":"","url":"https://api.github.com/users/fessyfoo","html_url":"https://github.com/fessyfoo","followers_url":"https://api.github.com/users/fessyfoo/followers","following_url":"https://api.github.com/users/fessyfoo/following{/other_user}","gists_url":"https://api.github.com/users/fessyfoo/gists{/gist_id}","starred_url":"https://api.github.com/users/fessyfoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fessyfoo/subscriptions","organizations_url":"https://api.github.com/users/fessyfoo/orgs","repos_url":"https://api.github.com/users/fessyfoo/repos","events_url":"https://api.github.com/users/fessyfoo/events{/privacy}","received_events_url":"https://api.github.com/users/fessyfoo/received_events","type":"User","site_admin":false},"created_at":"2016-06-10T03:15:51Z","updated_at":"2016-06-10T03:15:51Z","body":"Thought this might be handy info for someone else when reading this thread.\r\n\r\nhttps://github.com/sensu/sensu/blob/98f333ef306d15e308f89988d559fb6608ae711c/lib/sensu/server/process.rb#L278-L284\r\n```\r\n      # Add a check result to an aggregate. The aggregate name is\r\n      # determined by the value of check `:aggregate`. If check\r\n      # `:aggregate` is `true` (legacy), the check `:name` is used as\r\n      # the aggregate name. If check `:aggregate` is a string, it is\r\n      # used as the aggregate name. This method will add the client\r\n      # name to the aggregate, all other processing (e.g. counters) is\r\n      # done by the Sensu API on request.\r\n````"}}
{"actor":{"display_login":"fessyfoo"}}