{"action":"created","issue":{"url":"https://api.github.com/repos/DataDog/dd-agent/issues/2237","repository_url":"https://api.github.com/repos/DataDog/dd-agent","labels_url":"https://api.github.com/repos/DataDog/dd-agent/issues/2237/labels{/name}","comments_url":"https://api.github.com/repos/DataDog/dd-agent/issues/2237/comments","events_url":"https://api.github.com/repos/DataDog/dd-agent/issues/2237/events","html_url":"https://github.com/DataDog/dd-agent/pull/2237","id":129902031,"number":2237,"title":"[mongo] oplog replicationInfo metrics","user":{"login":"rhwlo","id":315383,"avatar_url":"https://avatars.githubusercontent.com/u/315383?v=3","gravatar_id":"","url":"https://api.github.com/users/rhwlo","html_url":"https://github.com/rhwlo","followers_url":"https://api.github.com/users/rhwlo/followers","following_url":"https://api.github.com/users/rhwlo/following{/other_user}","gists_url":"https://api.github.com/users/rhwlo/gists{/gist_id}","starred_url":"https://api.github.com/users/rhwlo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhwlo/subscriptions","organizations_url":"https://api.github.com/users/rhwlo/orgs","repos_url":"https://api.github.com/users/rhwlo/repos","events_url":"https://api.github.com/users/rhwlo/events{/privacy}","received_events_url":"https://api.github.com/users/rhwlo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/DataDog/dd-agent/labels/checks","name":"checks","color":"444444"},{"url":"https://api.github.com/repos/DataDog/dd-agent/labels/community","name":"community","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/DataDog/dd-agent/milestones/67","html_url":"https://github.com/DataDog/dd-agent/milestones/5.7.4","labels_url":"https://api.github.com/repos/DataDog/dd-agent/milestones/67/labels","id":1702252,"number":67,"title":"5.7.4","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":4,"state":"open","created_at":"2016-04-12T19:32:43Z","updated_at":"2016-04-15T16:33:52Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-01-29T22:37:56Z","updated_at":"2016-04-15T16:42:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/DataDog/dd-agent/pulls/2237","html_url":"https://github.com/DataDog/dd-agent/pull/2237","diff_url":"https://github.com/DataDog/dd-agent/pull/2237.diff","patch_url":"https://github.com/DataDog/dd-agent/pull/2237.patch"},"body":"# What’s this PR do?\r\n\r\nThis PR adds a few new metrics to dd-agent's mongo plugin, borrowed from [Mongo's db.getReplicationInfo()][0]:\r\n\r\n* [`mongodb.oplog.totalsizemb`][1]\r\n* [`mongodb.oplog.usedsizemb`][2]\r\n* [`mongodb.oplog.timediffseconds`][3]\r\n\r\n# Notes\r\n\r\nThe code for getting the metrics is a more-or-less direct translation from the Javascript `getReplicationInfo()` function from the mongo shell, with a few edits to exclude non-numerical fields. I also updated the metric names to include units where the mongo shell function didn’t.\r\n\r\n[0]: https://docs.mongodb.org/v3.2/reference/method/db.getReplicationInfo/\r\n[1]: https://docs.mongodb.org/v3.2/reference/method/db.getReplicationInfo/#db.getReplicationInfo.logSizeMB\r\n[2]: https://docs.mongodb.org/v3.2/reference/method/db.getReplicationInfo/#db.getReplicationInfo.usedMB\r\n[3]: https://docs.mongodb.org/v3.2/reference/method/db.getReplicationInfo/#db.getReplicationInfo.timeDiff"},"comment":{"url":"https://api.github.com/repos/DataDog/dd-agent/issues/comments/210540506","html_url":"https://github.com/DataDog/dd-agent/pull/2237#issuecomment-210540506","issue_url":"https://api.github.com/repos/DataDog/dd-agent/issues/2237","id":210540506,"user":{"login":"yannmh","id":5708089,"avatar_url":"https://avatars.githubusercontent.com/u/5708089?v=3","gravatar_id":"","url":"https://api.github.com/users/yannmh","html_url":"https://github.com/yannmh","followers_url":"https://api.github.com/users/yannmh/followers","following_url":"https://api.github.com/users/yannmh/following{/other_user}","gists_url":"https://api.github.com/users/yannmh/gists{/gist_id}","starred_url":"https://api.github.com/users/yannmh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yannmh/subscriptions","organizations_url":"https://api.github.com/users/yannmh/orgs","repos_url":"https://api.github.com/users/yannmh/repos","events_url":"https://api.github.com/users/yannmh/events{/privacy}","received_events_url":"https://api.github.com/users/yannmh/received_events","type":"User","site_admin":false},"created_at":"2016-04-15T16:42:15Z","updated_at":"2016-04-15T16:42:15Z","body":"Sorry for the late review @rhwlo.\r\n\r\nWe are planning a `5.7.4` release within the next 10 days. It will ship various improvements on the MongoDB check: thus, it'd be great to have your changes along them :).\r\n\r\nI am rereading, checking/testing your changes. Overall it looks :+1: . \r\n\r\nThanks again."}}