{"action":"closed","issue":{"url":"https://api.github.com/repos/firehol/netdata/issues/3846","repository_url":"https://api.github.com/repos/firehol/netdata","labels_url":"https://api.github.com/repos/firehol/netdata/issues/3846/labels{/name}","comments_url":"https://api.github.com/repos/firehol/netdata/issues/3846/comments","events_url":"https://api.github.com/repos/firehol/netdata/issues/3846/events","html_url":"https://github.com/firehol/netdata/issues/3846","id":333806177,"node_id":"MDU6SXNzdWUzMzM4MDYxNzc=","number":3846,"title":"Mongodb with ssl/keyfile does not work","user":{"login":"0xicl33n","id":2192160,"node_id":"MDQ6VXNlcjIxOTIxNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/2192160?v=4","gravatar_id":"","url":"https://api.github.com/users/0xicl33n","html_url":"https://github.com/0xicl33n","followers_url":"https://api.github.com/users/0xicl33n/followers","following_url":"https://api.github.com/users/0xicl33n/following{/other_user}","gists_url":"https://api.github.com/users/0xicl33n/gists{/gist_id}","starred_url":"https://api.github.com/users/0xicl33n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0xicl33n/subscriptions","organizations_url":"https://api.github.com/users/0xicl33n/orgs","repos_url":"https://api.github.com/users/0xicl33n/repos","events_url":"https://api.github.com/users/0xicl33n/events{/privacy}","received_events_url":"https://api.github.com/users/0xicl33n/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-19T19:24:59Z","updated_at":"2018-06-21T21:49:57Z","closed_at":"2018-06-21T21:49:57Z","author_association":"NONE","body":"Connecting to a server with keyfile encryption causes it to close immediately\r\n```\r\nnetdata@spyke2:/etc/netdata/python.d$ /usr/libexec/netdata/plugins.d/python.d.plugin 1 debug trace mongodb\r\n2018-06-19 19:15:57: python.d INFO: plugin: main: Using python 2\r\n2018-06-19 19:15:58: python.d DEBUG: plugin: main: module load source: 'mongodb' => [OK]\r\n2018-06-19 19:15:58: python.d DEBUG: plugin: main: module load config: 'mongodb' => [OK]\r\n2018-06-19 19:15:58: python.d DEBUG: plugin: main: job initialization: 'mongodb scalegrid' => ['OK']\r\n2018-06-19 19:15:58: python.d DEBUG: plugin: main: module status: 'mongodb' => [OK] (jobs: 1)\r\n2018-06-19 19:15:58: python.d ERROR: mongodb: scalegrid: connection closed\r\n2018-06-19 19:15:58: python.d INFO: mongodb: scalegrid: check() => [FAILED]\r\n2018-06-19 19:15:59: python.d INFO: plugin: main: FINISHED\r\n```\r\n\r\n`pymongo` [supports SSL and keyfile encrytion](http://api.mongodb.com/python/current/examples/tls.html), but netdata does not. It can be completely transparent of the actual netdata application since it is just a plugin. I will look into adding support for it. The conf file could look like this:\r\n\r\n**mongodb.conf:**\r\n```\r\nexample:\r\n    name : 'example'\r\n    host : 127.0.0.1\r\n    port : 45801\r\n    user : 'user'\r\n    password : 'password' \r\n    ssl : 'yes'\r\n    keyfile : '/home/netdata/db.pem'\r\n\r\n```\r\n\r\nThe other option is to  allow us to connect with [mongodb connect strings](https://docs.mongodb.com/manual/reference/connection-string/). [Motor ](http://motor.readthedocs.io/en/stable/)would actually be a much better alternative to pymongo as well since they both have the same syntax\r\n"}}
{"actor":{"display_login":"0xicl33n"}}