{"action":"created","comment":{"url":"https://api.github.com/repos/hawkular/hawkular-alerts/pulls/comments/91680979","pull_request_review_id":12191173,"id":91680979,"diff_hunk":"@@ -0,0 +1,181 @@\n+/*\n+ * Copyright 2015-2016 Red Hat, Inc. and/or its affiliates\n+ * and other contributors as indicated by the @author tags.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *    http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.hawkular.alerts.api.model.condition;\n+\n+import java.util.List;\n+\n+import org.hawkular.alerts.api.model.condition.Condition.Type;\n+import org.hawkular.alerts.api.model.condition.NelsonCondition.NelsonRule;\n+import org.hawkular.alerts.api.model.data.Data;\n+\n+import com.fasterxml.jackson.annotation.JsonInclude;\n+import com.fasterxml.jackson.annotation.JsonInclude.Include;\n+\n+import io.swagger.annotations.ApiModel;\n+import io.swagger.annotations.ApiModelProperty;\n+\n+/**\n+ * An evaluation state for nelson condition.\n+ *\n+ * @author Jay Shaughnessy\n+ * @author Lucas Ponce\n+ */\n+@ApiModel(description = \"An evaluation state for nelson condition.\")\n+public class NelsonConditionEval extends ConditionEval {\n+\n+    private static final long serialVersionUID = 1L;\n+\n+    @ApiModelProperty(value = \"Nelson condition linked with this state.\", position = 0)\n+    @JsonInclude(Include.NON_NULL)\n+    private NelsonCondition condition;\n+\n+    @ApiModelProperty(value = \"Mean applied to NelsonRules.\", position = 1)\n+    @JsonInclude(Include.NON_NULL)\n+    private Double mean;\n+\n+    @ApiModelProperty(value = \"Standard Deviation applied to NelsonRules.\", position = 2)\n+    @JsonInclude(Include.NON_NULL)\n+    private Double standardDeviation;\n+\n+    @ApiModelProperty(value = \"Data used to determine violations.\", position = 3)\n+    @JsonInclude(Include.NON_NULL)\n+    private List<Data> violationsData;\n+\n+    @ApiModelProperty(value = \"NelsonRule violations for the data.\", position = 5)","path":"hawkular-alerts-api/src/main/java/org/hawkular/alerts/api/model/condition/NelsonConditionEval.java","position":58,"original_position":58,"commit_id":"115f480b3bbb81f1ec557e2138c9fafe1e9cec41","original_commit_id":"115f480b3bbb81f1ec557e2138c9fafe1e9cec41","user":{"login":"lucasponce","id":1662329,"avatar_url":"https://avatars.githubusercontent.com/u/1662329?v=3","gravatar_id":"","url":"https://api.github.com/users/lucasponce","html_url":"https://github.com/lucasponce","followers_url":"https://api.github.com/users/lucasponce/followers","following_url":"https://api.github.com/users/lucasponce/following{/other_user}","gists_url":"https://api.github.com/users/lucasponce/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasponce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasponce/subscriptions","organizations_url":"https://api.github.com/users/lucasponce/orgs","repos_url":"https://api.github.com/users/lucasponce/repos","events_url":"https://api.github.com/users/lucasponce/events{/privacy}","received_events_url":"https://api.github.com/users/lucasponce/received_events","type":"User","site_admin":false},"body":"position = 4 ?","created_at":"2016-12-09T09:17:45Z","updated_at":"2016-12-09T09:17:45Z","html_url":"https://github.com/hawkular/hawkular-alerts/pull/270#discussion_r91680979","pull_request_url":"https://api.github.com/repos/hawkular/hawkular-alerts/pulls/270","_links":{"self":{"href":"https://api.github.com/repos/hawkular/hawkular-alerts/pulls/comments/91680979"},"html":{"href":"https://github.com/hawkular/hawkular-alerts/pull/270#discussion_r91680979"},"pull_request":{"href":"https://api.github.com/repos/hawkular/hawkular-alerts/pulls/270"}}},"pull_request":{"url":"https://api.github.com/repos/hawkular/hawkular-alerts/pulls/270","id":97023776,"html_url":"https://github.com/hawkular/hawkular-alerts/pull/270","diff_url":"https://github.com/hawkular/hawkular-alerts/pull/270.diff","patch_url":"https://github.com/hawkular/hawkular-alerts/pull/270.patch","issue_url":"https://api.github.com/repos/hawkular/hawkular-alerts/issues/270","number":270,"state":"open","locked":false,"title":"HWKALERTS-209 NelsonRules","user":{"login":"jshaughn","id":2104052,"avatar_url":"https://avatars.githubusercontent.com/u/2104052?v=3","gravatar_id":"","url":"https://api.github.com/users/jshaughn","html_url":"https://github.com/jshaughn","followers_url":"https://api.github.com/users/jshaughn/followers","following_url":"https://api.github.com/users/jshaughn/following{/other_user}","gists_url":"https://api.github.com/users/jshaughn/gists{/gist_id}","starred_url":"https://api.github.com/users/jshaughn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshaughn/subscriptions","organizations_url":"https://api.github.com/users/jshaughn/orgs","repos_url":"https://api.github.com/users/jshaughn/repos","events_url":"https://api.github.com/users/jshaughn/events{/privacy}","received_events_url":"https://api.github.com/users/jshaughn/received_events","type":"User","site_admin":false},"body":"- Introduce a new native condition type, NelsonCondition. This\r\ncondition uses \"Nelson Rules\" to detect \"out-of-control\" metric\r\nbehavior.  The condition establishes baseline metric behavior\r\nbased on a configurable metric sample (mean, stdDev) and uses the\r\nbaseline to perform analysis on the incoming measurements.\r\n- Introduces apache math3 dep for engine\r\n- Introduce new activeRules field in conditions table\r\n\r\nAlso:\r\n- fixes for HWKALERTS-208 because I was already adding some  new condition support...\r\n- Fix bug with MISSING conditions in group trigger support\r\n- improve the toString for Alert\r\n- add some missing test support for a couple of condition types\r\n\r\n@lucasponce, please review at your leisure. We can talk about it off-PR as well, if it makes sense.\r\n","created_at":"2016-12-07T22:46:40Z","updated_at":"2016-12-09T09:17:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef4810535a4e0ec85851ab46d1eca97569f56855","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/hawkular/hawkular-alerts/pulls/270/commits","review_comments_url":"https://api.github.com/repos/hawkular/hawkular-alerts/pulls/270/comments","review_comment_url":"https://api.github.com/repos/hawkular/hawkular-alerts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hawkular/hawkular-alerts/issues/270/comments","statuses_url":"https://api.github.com/repos/hawkular/hawkular-alerts/statuses/115f480b3bbb81f1ec557e2138c9fafe1e9cec41","head":{"label":"jshaughn:nelson-rules","ref":"nelson-rules","sha":"115f480b3bbb81f1ec557e2138c9fafe1e9cec41","user":{"login":"jshaughn","id":2104052,"avatar_url":"https://avatars.githubusercontent.com/u/2104052?v=3","gravatar_id":"","url":"https://api.github.com/users/jshaughn","html_url":"https://github.com/jshaughn","followers_url":"https://api.github.com/users/jshaughn/followers","following_url":"https://api.github.com/users/jshaughn/following{/other_user}","gists_url":"https://api.github.com/users/jshaughn/gists{/gist_id}","starred_url":"https://api.github.com/users/jshaughn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshaughn/subscriptions","organizations_url":"https://api.github.com/users/jshaughn/orgs","repos_url":"https://api.github.com/users/jshaughn/repos","events_url":"https://api.github.com/users/jshaughn/events{/privacy}","received_events_url":"https://api.github.com/users/jshaughn/received_events","type":"User","site_admin":false},"repo":{"id":32933334,"name":"hawkular-alerts","full_name":"jshaughn/hawkular-alerts","owner":{"login":"jshaughn","id":2104052,"avatar_url":"https://avatars.githubusercontent.com/u/2104052?v=3","gravatar_id":"","url":"https://api.github.com/users/jshaughn","html_url":"https://github.com/jshaughn","followers_url":"https://api.github.com/users/jshaughn/followers","following_url":"https://api.github.com/users/jshaughn/following{/other_user}","gists_url":"https://api.github.com/users/jshaughn/gists{/gist_id}","starred_url":"https://api.github.com/users/jshaughn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshaughn/subscriptions","organizations_url":"https://api.github.com/users/jshaughn/orgs","repos_url":"https://api.github.com/users/jshaughn/repos","events_url":"https://api.github.com/users/jshaughn/events{/privacy}","received_events_url":"https://api.github.com/users/jshaughn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jshaughn/hawkular-alerts","description":"Alerting subsystem for Hawkular","fork":true,"url":"https://api.github.com/repos/jshaughn/hawkular-alerts","forks_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/forks","keys_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/teams","hooks_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/hooks","issue_events_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/issues/events{/number}","events_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/events","assignees_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/assignees{/user}","branches_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/branches{/branch}","tags_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/tags","blobs_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/git/refs{/sha}","trees_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/statuses/{sha}","languages_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/languages","stargazers_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/stargazers","contributors_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/contributors","subscribers_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/subscribers","subscription_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/subscription","commits_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/commits{/sha}","git_commits_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/git/commits{/sha}","comments_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/comments{/number}","issue_comment_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/issues/comments{/number}","contents_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/contents/{+path}","compare_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/merges","archive_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/downloads","issues_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/issues{/number}","pulls_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/pulls{/number}","milestones_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/milestones{/number}","notifications_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/labels{/name}","releases_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/releases{/id}","deployments_url":"https://api.github.com/repos/jshaughn/hawkular-alerts/deployments","created_at":"2015-03-26T14:49:41Z","updated_at":"2015-03-26T14:49:42Z","pushed_at":"2016-12-07T22:44:28Z","git_url":"git://github.com/jshaughn/hawkular-alerts.git","ssh_url":"git@github.com:jshaughn/hawkular-alerts.git","clone_url":"https://github.com/jshaughn/hawkular-alerts.git","svn_url":"https://github.com/jshaughn/hawkular-alerts","homepage":null,"size":4235,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"hawkular:master","ref":"master","sha":"b3cfea3cf1e5b28985523083f20191dafaecfa48","user":{"login":"hawkular","id":10179627,"avatar_url":"https://avatars.githubusercontent.com/u/10179627?v=3","gravatar_id":"","url":"https://api.github.com/users/hawkular","html_url":"https://github.com/hawkular","followers_url":"https://api.github.com/users/hawkular/followers","following_url":"https://api.github.com/users/hawkular/following{/other_user}","gists_url":"https://api.github.com/users/hawkular/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkular/subscriptions","organizations_url":"https://api.github.com/users/hawkular/orgs","repos_url":"https://api.github.com/users/hawkular/repos","events_url":"https://api.github.com/users/hawkular/events{/privacy}","received_events_url":"https://api.github.com/users/hawkular/received_events","type":"Organization","site_admin":false},"repo":{"id":29608496,"name":"hawkular-alerts","full_name":"hawkular/hawkular-alerts","owner":{"login":"hawkular","id":10179627,"avatar_url":"https://avatars.githubusercontent.com/u/10179627?v=3","gravatar_id":"","url":"https://api.github.com/users/hawkular","html_url":"https://github.com/hawkular","followers_url":"https://api.github.com/users/hawkular/followers","following_url":"https://api.github.com/users/hawkular/following{/other_user}","gists_url":"https://api.github.com/users/hawkular/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkular/subscriptions","organizations_url":"https://api.github.com/users/hawkular/orgs","repos_url":"https://api.github.com/users/hawkular/repos","events_url":"https://api.github.com/users/hawkular/events{/privacy}","received_events_url":"https://api.github.com/users/hawkular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hawkular/hawkular-alerts","description":"Alerting subsystem for Hawkular","fork":false,"url":"https://api.github.com/repos/hawkular/hawkular-alerts","forks_url":"https://api.github.com/repos/hawkular/hawkular-alerts/forks","keys_url":"https://api.github.com/repos/hawkular/hawkular-alerts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hawkular/hawkular-alerts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hawkular/hawkular-alerts/teams","hooks_url":"https://api.github.com/repos/hawkular/hawkular-alerts/hooks","issue_events_url":"https://api.github.com/repos/hawkular/hawkular-alerts/issues/events{/number}","events_url":"https://api.github.com/repos/hawkular/hawkular-alerts/events","assignees_url":"https://api.github.com/repos/hawkular/hawkular-alerts/assignees{/user}","branches_url":"https://api.github.com/repos/hawkular/hawkular-alerts/branches{/branch}","tags_url":"https://api.github.com/repos/hawkular/hawkular-alerts/tags","blobs_url":"https://api.github.com/repos/hawkular/hawkular-alerts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hawkular/hawkular-alerts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hawkular/hawkular-alerts/git/refs{/sha}","trees_url":"https://api.github.com/repos/hawkular/hawkular-alerts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hawkular/hawkular-alerts/statuses/{sha}","languages_url":"https://api.github.com/repos/hawkular/hawkular-alerts/languages","stargazers_url":"https://api.github.com/repos/hawkular/hawkular-alerts/stargazers","contributors_url":"https://api.github.com/repos/hawkular/hawkular-alerts/contributors","subscribers_url":"https://api.github.com/repos/hawkular/hawkular-alerts/subscribers","subscription_url":"https://api.github.com/repos/hawkular/hawkular-alerts/subscription","commits_url":"https://api.github.com/repos/hawkular/hawkular-alerts/commits{/sha}","git_commits_url":"https://api.github.com/repos/hawkular/hawkular-alerts/git/commits{/sha}","comments_url":"https://api.github.com/repos/hawkular/hawkular-alerts/comments{/number}","issue_comment_url":"https://api.github.com/repos/hawkular/hawkular-alerts/issues/comments{/number}","contents_url":"https://api.github.com/repos/hawkular/hawkular-alerts/contents/{+path}","compare_url":"https://api.github.com/repos/hawkular/hawkular-alerts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hawkular/hawkular-alerts/merges","archive_url":"https://api.github.com/repos/hawkular/hawkular-alerts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hawkular/hawkular-alerts/downloads","issues_url":"https://api.github.com/repos/hawkular/hawkular-alerts/issues{/number}","pulls_url":"https://api.github.com/repos/hawkular/hawkular-alerts/pulls{/number}","milestones_url":"https://api.github.com/repos/hawkular/hawkular-alerts/milestones{/number}","notifications_url":"https://api.github.com/repos/hawkular/hawkular-alerts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hawkular/hawkular-alerts/labels{/name}","releases_url":"https://api.github.com/repos/hawkular/hawkular-alerts/releases{/id}","deployments_url":"https://api.github.com/repos/hawkular/hawkular-alerts/deployments","created_at":"2015-01-21T19:59:08Z","updated_at":"2016-11-24T01:23:11Z","pushed_at":"2016-12-08T16:36:30Z","git_url":"git://github.com/hawkular/hawkular-alerts.git","ssh_url":"git@github.com:hawkular/hawkular-alerts.git","clone_url":"https://github.com/hawkular/hawkular-alerts.git","svn_url":"https://github.com/hawkular/hawkular-alerts","homepage":null,"size":4483,"stargazers_count":18,"watchers_count":18,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":1,"forks":17,"open_issues":1,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hawkular/hawkular-alerts/pulls/270"},"html":{"href":"https://github.com/hawkular/hawkular-alerts/pull/270"},"issue":{"href":"https://api.github.com/repos/hawkular/hawkular-alerts/issues/270"},"comments":{"href":"https://api.github.com/repos/hawkular/hawkular-alerts/issues/270/comments"},"review_comments":{"href":"https://api.github.com/repos/hawkular/hawkular-alerts/pulls/270/comments"},"review_comment":{"href":"https://api.github.com/repos/hawkular/hawkular-alerts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hawkular/hawkular-alerts/pulls/270/commits"},"statuses":{"href":"https://api.github.com/repos/hawkular/hawkular-alerts/statuses/115f480b3bbb81f1ec557e2138c9fafe1e9cec41"}}}}
{"actor":{"display_login":"lucasponce"}}