{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/beats/issues/9003","repository_url":"https://api.github.com/repos/elastic/beats","labels_url":"https://api.github.com/repos/elastic/beats/issues/9003/labels{/name}","comments_url":"https://api.github.com/repos/elastic/beats/issues/9003/comments","events_url":"https://api.github.com/repos/elastic/beats/issues/9003/events","html_url":"https://github.com/elastic/beats/pull/9003","id":378978400,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5NTU1NzQ5","number":9003,"title":"Check license for CCR before attempting to fetch stats","user":{"login":"ycombinator","id":51061,"node_id":"MDQ6VXNlcjUxMDYx","avatar_url":"https://avatars2.githubusercontent.com/u/51061?v=4","gravatar_id":"","url":"https://api.github.com/users/ycombinator","html_url":"https://github.com/ycombinator","followers_url":"https://api.github.com/users/ycombinator/followers","following_url":"https://api.github.com/users/ycombinator/following{/other_user}","gists_url":"https://api.github.com/users/ycombinator/gists{/gist_id}","starred_url":"https://api.github.com/users/ycombinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ycombinator/subscriptions","organizations_url":"https://api.github.com/users/ycombinator/orgs","repos_url":"https://api.github.com/users/ycombinator/repos","events_url":"https://api.github.com/users/ycombinator/events{/privacy}","received_events_url":"https://api.github.com/users/ycombinator/received_events","type":"User","site_admin":false},"labels":[{"id":331378892,"node_id":"MDU6TGFiZWwzMzEzNzg4OTI=","url":"https://api.github.com/repos/elastic/beats/labels/Metricbeat","name":"Metricbeat","color":"008000","default":false},{"id":216798909,"node_id":"MDU6TGFiZWwyMTY3OTg5MDk=","url":"https://api.github.com/repos/elastic/beats/labels/in%20progress","name":"in progress","color":"207de5","default":false},{"id":983796922,"node_id":"MDU6TGFiZWw5ODM3OTY5MjI=","url":"https://api.github.com/repos/elastic/beats/labels/monitoring","name":"monitoring","color":"41f261","default":false},{"id":1104784048,"node_id":"MDU6TGFiZWwxMTA0Nzg0MDQ4","url":"https://api.github.com/repos/elastic/beats/labels/v6.6.0","name":"v6.6.0","color":"ededed","default":false},{"id":884168819,"node_id":"MDU6TGFiZWw4ODQxNjg4MTk=","url":"https://api.github.com/repos/elastic/beats/labels/v7.0.0-alpha1","name":"v7.0.0-alpha1","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-09T00:47:09Z","updated_at":"2018-11-10T12:04:40Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/elastic/beats/pulls/9003","html_url":"https://github.com/elastic/beats/pull/9003","diff_url":"https://github.com/elastic/beats/pull/9003.diff","patch_url":"https://github.com/elastic/beats/pull/9003.patch"},"body":"Resolves #8915.\r\n\r\nThis PR teaches the `Fetch()` method of the `elasticsearch/ccr` metricset to first check if the CCR feature is available per the current Elasticsearch license. If it isn't, the metricset logs+reports an **actionable** error message **every minute**.\r\n\r\nBefore this PR, there was no such check so the call to the CCR stats API would simply fail with a 403 error from Elasticsearch if Elasticsearch wasn't using a Trial or Platinum license. That unhelpful 403 error would get logged+reported every 10s (or whatever `period` the metricset was configured to).\r\n\r\n## Before this PR\r\n\r\n### In the `metricbeat` logs:\r\n\r\n<img width=\"839\" alt=\"screen shot 2018-11-08 at 4 42 28 pm\" src=\"https://user-images.githubusercontent.com/51061/48236039-5fa30c80-e375-11e8-8d9d-64c4861fb35d.png\">\r\n\r\n\r\n### In the `metricbeat-*` index:\r\n\r\n<img width=\"1491\" alt=\"screen shot 2018-11-08 at 4 42 38 pm\" src=\"https://user-images.githubusercontent.com/51061/48236036-5b76ef00-e375-11e8-9a21-7cde7620c80b.png\">\r\n\r\n\r\n## After this PR\r\n\r\n### In the `metricbeat` logs:\r\n\r\n<img width=\"1236\" alt=\"screen shot 2018-11-08 at 4 35 19 pm\" src=\"https://user-images.githubusercontent.com/51061/48235932-e4415b00-e374-11e8-8b39-a60e4fe87279.png\">\r\n\r\n### In the `metricbeat-*` index:\r\n\r\n<img width=\"1495\" alt=\"screen shot 2018-11-08 at 4 37 27 pm\" src=\"https://user-images.githubusercontent.com/51061/48235909-d095f480-e374-11e8-9eea-718c0deacafa.png\">\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/beats/issues/comments/437579252","html_url":"https://github.com/elastic/beats/pull/9003#issuecomment-437579252","issue_url":"https://api.github.com/repos/elastic/beats/issues/9003","id":437579252,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzU3OTI1Mg==","user":{"login":"ycombinator","id":51061,"node_id":"MDQ6VXNlcjUxMDYx","avatar_url":"https://avatars2.githubusercontent.com/u/51061?v=4","gravatar_id":"","url":"https://api.github.com/users/ycombinator","html_url":"https://github.com/ycombinator","followers_url":"https://api.github.com/users/ycombinator/followers","following_url":"https://api.github.com/users/ycombinator/following{/other_user}","gists_url":"https://api.github.com/users/ycombinator/gists{/gist_id}","starred_url":"https://api.github.com/users/ycombinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ycombinator/subscriptions","organizations_url":"https://api.github.com/users/ycombinator/orgs","repos_url":"https://api.github.com/users/ycombinator/repos","events_url":"https://api.github.com/users/ycombinator/events{/privacy}","received_events_url":"https://api.github.com/users/ycombinator/received_events","type":"User","site_admin":false},"created_at":"2018-11-10T12:04:40Z","updated_at":"2018-11-10T12:04:40Z","author_association":"CONTRIBUTOR","body":"Things aren't quite working correctly after my latest changes so I'm moving this PR out of review for now.  "}}
{"actor":{"display_login":"ycombinator"}}