{"action":"created","issue":{"url":"https://api.github.com/repos/grafana/grafana/issues/10843","repository_url":"https://api.github.com/repos/grafana/grafana","labels_url":"https://api.github.com/repos/grafana/grafana/issues/10843/labels{/name}","comments_url":"https://api.github.com/repos/grafana/grafana/issues/10843/comments","events_url":"https://api.github.com/repos/grafana/grafana/issues/10843/events","html_url":"https://github.com/grafana/grafana/issues/10843","id":295602542,"number":10843,"title":"Intermittent alert \"Could not find datasource Data source not found\"","user":{"login":"retzkek","id":1627510,"avatar_url":"https://avatars1.githubusercontent.com/u/1627510?v=4","gravatar_id":"","url":"https://api.github.com/users/retzkek","html_url":"https://github.com/retzkek","followers_url":"https://api.github.com/users/retzkek/followers","following_url":"https://api.github.com/users/retzkek/following{/other_user}","gists_url":"https://api.github.com/users/retzkek/gists{/gist_id}","starred_url":"https://api.github.com/users/retzkek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/retzkek/subscriptions","organizations_url":"https://api.github.com/users/retzkek/orgs","repos_url":"https://api.github.com/users/retzkek/repos","events_url":"https://api.github.com/users/retzkek/events{/privacy}","received_events_url":"https://api.github.com/users/retzkek/received_events","type":"User","site_admin":false},"labels":[{"id":227867844,"url":"https://api.github.com/repos/grafana/grafana/labels/comp:%20alerting","name":"comp: alerting","color":"c5def5","default":false},{"id":70176318,"url":"https://api.github.com/repos/grafana/grafana/labels/type:%20bug","name":"type: bug","color":"b60205","default":false}],"state":"open","locked":false,"assignee":{"login":"bergquist","id":618863,"avatar_url":"https://avatars0.githubusercontent.com/u/618863?v=4","gravatar_id":"","url":"https://api.github.com/users/bergquist","html_url":"https://github.com/bergquist","followers_url":"https://api.github.com/users/bergquist/followers","following_url":"https://api.github.com/users/bergquist/following{/other_user}","gists_url":"https://api.github.com/users/bergquist/gists{/gist_id}","starred_url":"https://api.github.com/users/bergquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bergquist/subscriptions","organizations_url":"https://api.github.com/users/bergquist/orgs","repos_url":"https://api.github.com/users/bergquist/repos","events_url":"https://api.github.com/users/bergquist/events{/privacy}","received_events_url":"https://api.github.com/users/bergquist/received_events","type":"User","site_admin":false},"assignees":[{"login":"bergquist","id":618863,"avatar_url":"https://avatars0.githubusercontent.com/u/618863?v=4","gravatar_id":"","url":"https://api.github.com/users/bergquist","html_url":"https://github.com/bergquist","followers_url":"https://api.github.com/users/bergquist/followers","following_url":"https://api.github.com/users/bergquist/following{/other_user}","gists_url":"https://api.github.com/users/bergquist/gists{/gist_id}","starred_url":"https://api.github.com/users/bergquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bergquist/subscriptions","organizations_url":"https://api.github.com/users/bergquist/orgs","repos_url":"https://api.github.com/users/bergquist/repos","events_url":"https://api.github.com/users/bergquist/events{/privacy}","received_events_url":"https://api.github.com/users/bergquist/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/grafana/grafana/milestones/82","html_url":"https://github.com/grafana/grafana/milestone/82","labels_url":"https://api.github.com/repos/grafana/grafana/milestones/82/labels","id":3092290,"number":82,"title":"5.0.0-beta3","description":"","creator":{"login":"torkelo","id":10999,"avatar_url":"https://avatars3.githubusercontent.com/u/10999?v=4","gravatar_id":"","url":"https://api.github.com/users/torkelo","html_url":"https://github.com/torkelo","followers_url":"https://api.github.com/users/torkelo/followers","following_url":"https://api.github.com/users/torkelo/following{/other_user}","gists_url":"https://api.github.com/users/torkelo/gists{/gist_id}","starred_url":"https://api.github.com/users/torkelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torkelo/subscriptions","organizations_url":"https://api.github.com/users/torkelo/orgs","repos_url":"https://api.github.com/users/torkelo/repos","events_url":"https://api.github.com/users/torkelo/events{/privacy}","received_events_url":"https://api.github.com/users/torkelo/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":2,"state":"open","created_at":"2018-02-06T09:15:07Z","updated_at":"2018-02-14T10:40:53Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2018-02-08T17:35:41Z","updated_at":"2018-02-14T12:36:27Z","closed_at":null,"author_association":"NONE","body":"- What Grafana version are you using? 5.0.0-beta1\r\n- What datasource are you using? Prometheus\r\n- What OS are you running grafana on? CentOS 7\r\n\r\nI upgraded our test server to v5 beta yesterday, and since then I've been getting intermittent alerts triggered with the error \"Data source not found.\" The alert then clears on the next run.\r\n\r\n```t=2018-02-08T16:39:24+0000 lvl=eror msg=\"Alert Rule Result Error\" logger=alerting.evalHandler ruleId=15 name=\"RabbitMQ Queue alert\" error=\"Could not find datasource Data source not found\" changing state to=alerting```\r\n\r\nI've seen this for multiple alerts, but not all, and not at the same time. All the alerts use the same Prometheus data source."},"comment":{"url":"https://api.github.com/repos/grafana/grafana/issues/comments/365594576","html_url":"https://github.com/grafana/grafana/issues/10843#issuecomment-365594576","issue_url":"https://api.github.com/repos/grafana/grafana/issues/10843","id":365594576,"user":{"login":"bergquist","id":618863,"avatar_url":"https://avatars0.githubusercontent.com/u/618863?v=4","gravatar_id":"","url":"https://api.github.com/users/bergquist","html_url":"https://github.com/bergquist","followers_url":"https://api.github.com/users/bergquist/followers","following_url":"https://api.github.com/users/bergquist/following{/other_user}","gists_url":"https://api.github.com/users/bergquist/gists{/gist_id}","starred_url":"https://api.github.com/users/bergquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bergquist/subscriptions","organizations_url":"https://api.github.com/users/bergquist/orgs","repos_url":"https://api.github.com/users/bergquist/repos","events_url":"https://api.github.com/users/bergquist/events{/privacy}","received_events_url":"https://api.github.com/users/bergquist/received_events","type":"User","site_admin":false},"created_at":"2018-02-14T12:36:27Z","updated_at":"2018-02-14T12:36:27Z","author_association":"CONTRIBUTOR","body":"I've been spelunking in the code for a while. \r\n\r\nThe error is created at \r\nhttps://github.com/grafana/grafana/blob/master/pkg/services/sqlstore/datasource.go#L32\r\nthen bubble up to.\r\nhttps://github.com/grafana/grafana/blob/master/pkg/services/alerting/conditions/query.go#L109\r\n\r\nThe error handling in https://github.com/grafana/grafana/blob/master/pkg/services/sqlstore/datasource.go#L32 is broken since we always return `m.ErrDataSourceNotFound` if the sql query fails. (I just fixed this in master) Kinda hard to investigate this issue further. @retzkek Any chance you could try our master build (available in ~30min) and see if you get a new error?\r\n\r\n\r\n"}}
{"actor":{"display_login":"bergquist"}}