{"action":"opened","issue":{"url":"https://api.github.com/repos/bosun-monitor/bosun/issues/1683","repository_url":"https://api.github.com/repos/bosun-monitor/bosun","labels_url":"https://api.github.com/repos/bosun-monitor/bosun/issues/1683/labels{/name}","comments_url":"https://api.github.com/repos/bosun-monitor/bosun/issues/1683/comments","events_url":"https://api.github.com/repos/bosun-monitor/bosun/issues/1683/events","html_url":"https://github.com/bosun-monitor/bosun/issues/1683","id":143817663,"number":1683,"title":"Alert condition validation ","user":{"login":"pavanshetty05","id":17142183,"avatar_url":"https://avatars.githubusercontent.com/u/17142183?v=3","gravatar_id":"","url":"https://api.github.com/users/pavanshetty05","html_url":"https://github.com/pavanshetty05","followers_url":"https://api.github.com/users/pavanshetty05/followers","following_url":"https://api.github.com/users/pavanshetty05/following{/other_user}","gists_url":"https://api.github.com/users/pavanshetty05/gists{/gist_id}","starred_url":"https://api.github.com/users/pavanshetty05/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavanshetty05/subscriptions","organizations_url":"https://api.github.com/users/pavanshetty05/orgs","repos_url":"https://api.github.com/users/pavanshetty05/repos","events_url":"https://api.github.com/users/pavanshetty05/events{/privacy}","received_events_url":"https://api.github.com/users/pavanshetty05/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-27T15:09:38Z","updated_at":"2016-03-27T15:09:38Z","closed_at":null,"body":"Every time mail is generating . As per our understanding mail should generate only if this crit =  $metric <= 0 condition satisfy . Will you please let us know what is wrong in the alert ? expecting quick response from your side .\r\n\r\ntsdbHost = ***********:4242\r\nsmtpHost = *********:25\r\nemailFrom = bosun@*****.com\r\n\r\nnotification mails {\r\nemail = pavanshetty05@***********\r\nnext = mails\r\ntimeout = 2s\r\n}\r\n\r\n\r\n\r\ntemplate test {\r\n\tsubject = {{.Last.Status}}: {{.Alert.Name}} on {{.Group.host}}\r\n\tbody = `<p>Name: {{.Alert.Name}}\r\n\t<p>Time: {{.Time}}\r\n\t<p>Tags:\r\n\t<table>\r\n\t\t{{range $k, $v := .Group}}\r\n\t\t\t<tr><td>{{$k}}</td><td>{{$v}}</td></tr>\r\n\t\t{{end}}\r\n\t</table>`\r\n}\r\n\r\n\r\nalert cpu.usage.alert {\r\n\ttemplate = test\r\n\t$metric = nv(avg(q(\"min:rate:proc.uptime.now{host=*}\", \"1h\", \"\")),-1)\r\n\tcrit =  $metric <= 0\r\n\tcritNotification=mails\r\n   \t\r\n}\r\n"}}