{"action":"created","issue":{"url":"https://api.github.com/repos/DataDog/dd-agent/issues/2581","repository_url":"https://api.github.com/repos/DataDog/dd-agent","labels_url":"https://api.github.com/repos/DataDog/dd-agent/issues/2581/labels{/name}","comments_url":"https://api.github.com/repos/DataDog/dd-agent/issues/2581/comments","events_url":"https://api.github.com/repos/DataDog/dd-agent/issues/2581/events","html_url":"https://github.com/DataDog/dd-agent/issues/2581","id":159183926,"number":2581,"title":"MongoDB agent fails on arbier","user":{"login":"mosheka","id":3786982,"avatar_url":"https://avatars.githubusercontent.com/u/3786982?v=3","gravatar_id":"","url":"https://api.github.com/users/mosheka","html_url":"https://github.com/mosheka","followers_url":"https://api.github.com/users/mosheka/followers","following_url":"https://api.github.com/users/mosheka/following{/other_user}","gists_url":"https://api.github.com/users/mosheka/gists{/gist_id}","starred_url":"https://api.github.com/users/mosheka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mosheka/subscriptions","organizations_url":"https://api.github.com/users/mosheka/orgs","repos_url":"https://api.github.com/users/mosheka/repos","events_url":"https://api.github.com/users/mosheka/events{/privacy}","received_events_url":"https://api.github.com/users/mosheka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-08T14:51:38Z","updated_at":"2016-06-08T14:52:14Z","closed_at":null,"body":"The mongodb agent fails to complete monitoring when monitored instance is an arbiter:\r\nThis is due to the fact that arbiter does not have an optimeDate field (https://github.com/DataDog/dd-agent/blob/master/checks.d/mongo.py:703):\r\n\r\n>                 if current is not None and primary is not None:\r\n>                     lag = primary['optimeDate'] - current['optimeDate']\r\n>                     data['replicationLag'] = total_seconds(lag)\r\n\r\nMaybe need to cahgne to \r\n>                 if current is not None and primary is not None and optimeData in current:\r\n>                     lag = primary['optimeDate'] - current['optimeDate']\r\n>                     data['replicationLag'] = total_seconds(lag)\r\n>                 else:\r\n>                     data['replicationLag'] = 0\r\n"},"comment":{"url":"https://api.github.com/repos/DataDog/dd-agent/issues/comments/224614507","html_url":"https://github.com/DataDog/dd-agent/issues/2581#issuecomment-224614507","issue_url":"https://api.github.com/repos/DataDog/dd-agent/issues/2581","id":224614507,"user":{"login":"mosheka","id":3786982,"avatar_url":"https://avatars.githubusercontent.com/u/3786982?v=3","gravatar_id":"","url":"https://api.github.com/users/mosheka","html_url":"https://github.com/mosheka","followers_url":"https://api.github.com/users/mosheka/followers","following_url":"https://api.github.com/users/mosheka/following{/other_user}","gists_url":"https://api.github.com/users/mosheka/gists{/gist_id}","starred_url":"https://api.github.com/users/mosheka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mosheka/subscriptions","organizations_url":"https://api.github.com/users/mosheka/orgs","repos_url":"https://api.github.com/users/mosheka/repos","events_url":"https://api.github.com/users/mosheka/events{/privacy}","received_events_url":"https://api.github.com/users/mosheka/received_events","type":"User","site_admin":false},"created_at":"2016-06-08T14:52:14Z","updated_at":"2016-06-08T14:52:14Z","body":"See error:\r\n\r\n>     mongo\r\n>     -----\r\n>       - instance #0 [ERROR]: \"global name 'optimeData' is not defined\"\r\n>       - Collected 0 metrics, 0 events & 2 service checks\r\n> "}}
{"actor":{"display_login":"mosheka"}}