{"action":"closed","issue":{"url":"https://api.github.com/repos/influxdata/kapacitor/issues/647","repository_url":"https://api.github.com/repos/influxdata/kapacitor","labels_url":"https://api.github.com/repos/influxdata/kapacitor/issues/647/labels{/name}","comments_url":"https://api.github.com/repos/influxdata/kapacitor/issues/647/comments","events_url":"https://api.github.com/repos/influxdata/kapacitor/issues/647/events","html_url":"https://github.com/influxdata/kapacitor/issues/647","id":160473353,"number":647,"title":"FEATURE: Adding Exists Node","user":{"login":"mingraham","id":8945383,"avatar_url":"https://avatars.githubusercontent.com/u/8945383?v=3","gravatar_id":"","url":"https://api.github.com/users/mingraham","html_url":"https://github.com/mingraham","followers_url":"https://api.github.com/users/mingraham/followers","following_url":"https://api.github.com/users/mingraham/following{/other_user}","gists_url":"https://api.github.com/users/mingraham/gists{/gist_id}","starred_url":"https://api.github.com/users/mingraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mingraham/subscriptions","organizations_url":"https://api.github.com/users/mingraham/orgs","repos_url":"https://api.github.com/users/mingraham/repos","events_url":"https://api.github.com/users/mingraham/events{/privacy}","received_events_url":"https://api.github.com/users/mingraham/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/influxdata/kapacitor/milestones/9","html_url":"https://github.com/influxdata/kapacitor/milestones/v1.1.0","labels_url":"https://api.github.com/repos/influxdata/kapacitor/milestones/9/labels","id":1814111,"number":9,"title":"v1.1.0","description":"","creator":{"login":"nathanielc","id":3771906,"avatar_url":"https://avatars.githubusercontent.com/u/3771906?v=3","gravatar_id":"","url":"https://api.github.com/users/nathanielc","html_url":"https://github.com/nathanielc","followers_url":"https://api.github.com/users/nathanielc/followers","following_url":"https://api.github.com/users/nathanielc/following{/other_user}","gists_url":"https://api.github.com/users/nathanielc/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanielc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanielc/subscriptions","organizations_url":"https://api.github.com/users/nathanielc/orgs","repos_url":"https://api.github.com/users/nathanielc/repos","events_url":"https://api.github.com/users/nathanielc/events{/privacy}","received_events_url":"https://api.github.com/users/nathanielc/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":1,"state":"open","created_at":"2016-06-07T18:42:51Z","updated_at":"2016-06-17T21:22:23Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2016-06-15T16:59:52Z","updated_at":"2016-06-17T21:22:23Z","closed_at":"2016-06-17T21:22:23Z","body":"Hello,\r\n\r\nI came across a use case where I needed to see if a value existed in a window. I couldn't think of a clever way with the nodes that were currently available, so I would like to suggest creating an `exists` node.\r\n\r\nHere is an example situation where it would be useful: Seeing if there was at least one HTTP 404 response in the past 5 minutes.\r\n\r\nExample TICKscript:\r\n```\r\nstream\r\n    |from()\r\n        .measurement('http_response')\r\n    |window()\r\n    \t.period(5m)\r\n    \t.every(5m)\r\n    \t.align()\r\n    |exists('http_response_code')\r\n        .target('404')\r\n    \t.as('404_exists')\r\n    |alert()\r\n        .message('There was a 404 in the past 5 minutes.')\r\n        .crit(lambda: \"404_exists\" == true)\r\n```"}}
{"actor":{"display_login":"mingraham"}}