Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this plugin support a containerized setup? #121

Open
mohsen1565 opened this issue Aug 26, 2021 · 8 comments
Open

Does this plugin support a containerized setup? #121

mohsen1565 opened this issue Aug 26, 2021 · 8 comments

Comments

@mohsen1565
Copy link

Hi James.
I was wondering if we have setup the stack as 2 containers, namely: 1-Grafana instance 2- MongoDB instance
Can we then still benefit from this solution? In the installation instructions, I see that one needs to be on the Grafana instance, inside the plugin directory to be able to proceed with the rest of the installation and npm needs to be installed there too.
I was actually thinking of spinning up a third container (node) and run the proxy node server inside that instead. Does this solution support the latter setup? If yes, can you explain how?
Many thanks in advance.

@rumatar
Copy link

rumatar commented Oct 7, 2021

+1

@barisvelioglu
Copy link

@mohsen1565

Exactly you can do what you mean. I already did that. I created a docker image to run mongodb grafana proxy as another container (https://hub.docker.com/repository/docker/barisv/grafana-mongo-proxy-server)

Then only thing you need to this to configure your mongo plugin to send request to those container.

@mohsen1565
Copy link
Author

@mohsen1565

Exactly you can do what you mean. I already did that. I created a docker image to run mongodb grafana proxy as another container (https://hub.docker.com/repository/docker/barisv/grafana-mongo-proxy-server)

Then only thing you need to this to configure your mongo plugin to send request to those container.

Hi there and thank you for your input. I have set it up like that exactly but it still wouldn't work. Any chance I can screenshare or send you code snippets to see how you did it. Or if you could possibly share yours....

@barisvelioglu
Copy link

barisvelioglu commented Oct 17, 2021

@mohsen1565

This is output:

image

This is plugin configuration

image

This is kubernetes:
image

I used port-forwarding for testing purposes


kubectl port-forward service/grafana 31002:80

If you cant solve your issue, we can look at it together. Please describe, what steps you did and whats the current problem ?

@rumatar
Copy link

rumatar commented Dec 22, 2021

@mohsen1565

Exactly you can do what you mean. I already did that. I created a docker image to run mongodb grafana proxy as another container (https://hub.docker.com/repository/docker/barisv/grafana-mongo-proxy-server)

Then only thing you need to this to configure your mongo plugin to send request to those container.

Can you please tell me how did you configure the pod with proxies?
Need to pass mongo addresses through env?

@glatiuden
Copy link

@mohsen1565

This is output:

image

This is plugin configuration

image

This is kubernetes: image

I used port-forwarding for testing purposes


kubectl port-forward service/grafana 31002:80

If you cant solve your issue, we can look at it together. Please describe, what steps you did and whats the current problem ?

Hey there! Thank you so much for your solution. I currently have the Grafana and the MongoDB Proxy API pod running, would you be able to advise on how do I add the Proxy Pod (the mongodbproxy-api) as a data source? I'm a bit confused. I understand the non-containerized version requires me to copy it into the Grafana plugin folders, but I'm unsure about the containerized version. Thank you once again :)

@rumatar
Copy link

rumatar commented Jan 27, 2022

Hi all.
I solved the issue by building my image of the grafana of the version I needed with the plugin integrated into it. Works great!

https://github.com/ajeje93/grafana-mongodb-docker

@denef
Copy link

denef commented Mar 19, 2023

So, here is how I do that:

  1. use image: grafana/grafana-oss with volumes: -./grafana-storage:/var/lib/grafana ENV GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=grafana-mongodb-datasource
  2. copy the plugin into grafana-storage/plugins restart Grafana
  3. launch the proxy container mentioned above mongoproxy image: barisv/grafana-mongo-proxy-server ports: - 3333:3333
  4. connect the datasource (go to plugins > mongoldb > add datasource)
  5. use http://monogoproxy:3333 as URL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants