meln5674 / grafana-mongodb-community-plugin

Open Source Grafana Plugin for querying MongoDB
GNU Affero General Public License v3.0
137 stars 18 forks source link

unable to connect mongoDB, pls help. #3

Closed seasoncool closed 2 years ago

seasoncool commented 2 years ago

Hi, I have installed the plugin in grafana and looks good , however when i clicked test button here was error show up.

in fact we mongoDB has no setup default username and password, pls share with us how to connect it (format).

and I could not find database name input area, where should input database name ?

grafana 8.1 version

thanks in advance.

image

meln5674 commented 2 years ago

Thanks for bringing this to my attention. I've only ever tried it with an authenticated MongoDB (I didn't even know mongo could run without authentication). I'll try adding one like that to my integration tests and get back to you.

seasoncool commented 2 years ago

@meln5674 thanks for your quick responses, i'm looking forward your new release.

meln5674 commented 2 years ago

Okay, I think I've solved it. Would you mind building the "bugfix/no-auth-allowed" branch from source and confirming if it solves your issue before I cut the new release?

If you configured the datasource through the browser, make sure also to click the "reset" buttons next to username and password fields to clear them out, and if you did it via a YAML file, remove the username and password fields from the secureJsonData section.

Also, as for your question about how to specify the database, that is not specified in the datasource, but instead, once the datasource is configured, the query section (in "explore" or in a dashboard) will have a section to specify the database, along with the collection and query pipeline.

seasoncool commented 2 years ago

@meln5674 , Could you build it for me please?
I'm a tester,i have no building environment and right to install building depends from our ubuntu server. Could you build it as zip file and upload into "bugfix/no-auth-allowed" branch that i could download zip from release. Thanks in advance.

meln5674 commented 2 years ago

No worries, I've cut a new release here: https://github.com/meln5674/grafana-mongodb-community-plugin/releases/tag/v0.1.1%2Brc1

seasoncool commented 2 years ago

@meln5674 , it works on this version now. We are able to connect mongoDB without username and password. I will close this issue & a lot thanks.