{"action":"created","issue":{"url":"https://api.github.com/repos/DataDog/dd-agent/issues/1648","labels_url":"https://api.github.com/repos/DataDog/dd-agent/issues/1648/labels{/name}","comments_url":"https://api.github.com/repos/DataDog/dd-agent/issues/1648/comments","events_url":"https://api.github.com/repos/DataDog/dd-agent/issues/1648/events","html_url":"https://github.com/DataDog/dd-agent/issues/1648","id":82401464,"number":1648,"title":"Send docker.containers.stopped as 0 when it is 0 instead of skipping key.","user":{"login":"JonGretar","id":5077,"avatar_url":"https://avatars.githubusercontent.com/u/5077?v=3","gravatar_id":"","url":"https://api.github.com/users/JonGretar","html_url":"https://github.com/JonGretar","followers_url":"https://api.github.com/users/JonGretar/followers","following_url":"https://api.github.com/users/JonGretar/following{/other_user}","gists_url":"https://api.github.com/users/JonGretar/gists{/gist_id}","starred_url":"https://api.github.com/users/JonGretar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonGretar/subscriptions","organizations_url":"https://api.github.com/users/JonGretar/orgs","repos_url":"https://api.github.com/users/JonGretar/repos","events_url":"https://api.github.com/users/JonGretar/events{/privacy}","received_events_url":"https://api.github.com/users/JonGretar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/DataDog/dd-agent/labels/bugfix","name":"bugfix","color":"eb6420"}],"state":"closed","locked":false,"assignee":{"login":"remh","id":1311477,"avatar_url":"https://avatars.githubusercontent.com/u/1311477?v=3","gravatar_id":"","url":"https://api.github.com/users/remh","html_url":"https://github.com/remh","followers_url":"https://api.github.com/users/remh/followers","following_url":"https://api.github.com/users/remh/following{/other_user}","gists_url":"https://api.github.com/users/remh/gists{/gist_id}","starred_url":"https://api.github.com/users/remh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remh/subscriptions","organizations_url":"https://api.github.com/users/remh/orgs","repos_url":"https://api.github.com/users/remh/repos","events_url":"https://api.github.com/users/remh/events{/privacy}","received_events_url":"https://api.github.com/users/remh/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/DataDog/dd-agent/milestones/48","html_url":"https://github.com/DataDog/dd-agent/milestones/5.5.0","labels_url":"https://api.github.com/repos/DataDog/dd-agent/milestones/48/labels","id":1105886,"number":48,"title":"5.5.0","description":null,"creator":{"login":"remh","id":1311477,"avatar_url":"https://avatars.githubusercontent.com/u/1311477?v=3","gravatar_id":"","url":"https://api.github.com/users/remh","html_url":"https://github.com/remh","followers_url":"https://api.github.com/users/remh/followers","following_url":"https://api.github.com/users/remh/following{/other_user}","gists_url":"https://api.github.com/users/remh/gists{/gist_id}","starred_url":"https://api.github.com/users/remh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remh/subscriptions","organizations_url":"https://api.github.com/users/remh/orgs","repos_url":"https://api.github.com/users/remh/repos","events_url":"https://api.github.com/users/remh/events{/privacy}","received_events_url":"https://api.github.com/users/remh/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":95,"state":"open","created_at":"2015-05-11T23:09:24Z","updated_at":"2015-09-15T17:57:52Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-05-29T12:08:19Z","updated_at":"2015-09-15T17:57:52Z","closed_at":"2015-09-15T17:57:52Z","body":"Currently the dd-agent seems to count stopped containers and send to `docker.containers.stopped`. If there are no stopped containers it seems to skip sending the key at all.\r\n\r\nThe problem with that arises when I try to monitor the key as in our system there should never be any container that is down for longer than a few seconds for upgrades and such.\r\n\r\nHowever datadog does not seem to count a missing value as 0. So if a container is stopped at 1:00am for 1 minute for upgrade and then another is stopped at 10:00am for a minute then when graphing it in datadog it will show that 1 container has been down continuously for the last 10 hours which is simply not the case.\r\n\r\nThat means that making a monitor that alerts me when *`docker.containers.stopped` is above or equal '1' on average for the last 10 minutes* will trigger for any stopped container immediately instead of when it has been down for 10 minutes. "},"comment":{"url":"https://api.github.com/repos/DataDog/dd-agent/issues/comments/140482485","html_url":"https://github.com/DataDog/dd-agent/issues/1648#issuecomment-140482485","issue_url":"https://api.github.com/repos/DataDog/dd-agent/issues/1648","id":140482485,"user":{"login":"remh","id":1311477,"avatar_url":"https://avatars.githubusercontent.com/u/1311477?v=3","gravatar_id":"","url":"https://api.github.com/users/remh","html_url":"https://github.com/remh","followers_url":"https://api.github.com/users/remh/followers","following_url":"https://api.github.com/users/remh/following{/other_user}","gists_url":"https://api.github.com/users/remh/gists{/gist_id}","starred_url":"https://api.github.com/users/remh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remh/subscriptions","organizations_url":"https://api.github.com/users/remh/orgs","repos_url":"https://api.github.com/users/remh/repos","events_url":"https://api.github.com/users/remh/events{/privacy}","received_events_url":"https://api.github.com/users/remh/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T17:57:52Z","updated_at":"2015-09-15T17:57:52Z","body":"Fixed in https://github.com/DataDog/dd-agent/pull/1824"}}