meln5674 / grafana-mongodb-community-plugin

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

Installing plugin using docker compose #12

Closed patrick-5546 closed 1 year ago

patrick-5546 commented 1 year ago

I am getting the following error trying to install this plugin:

Error: ✗ /plugins/repo/meln5674-mongodb-community=https:/github.com/meln5674/grafana-mongodb-community-plugin/releases/download/v0.1.2/meln5674-mongodb-community.zip does not exist (Grafana v9.4.7 linux-amd64)

This is my docker compose file:

  grafana:
    image: grafana/grafana-enterprise:latest
    restart: unless-stopped
    ports
      - "3000:3000"
    volumes:
      - ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
      - grafana-data:/var/lib/grafana
    environment:
      - "GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=meln5674-mongodb-community"
      - "GF_INSTALL_PLUGINS=meln5674-mongodb-community=https://github.com/meln5674/grafana-mongodb-community-plugin/releases/download/v0.1.2/meln5674-mongodb-community.zip"

Any idea what might be happening? It seems like the URL is not being passed through properly, as there is only one / after https:, but I'm not sure if this would cause the error.

meln5674 commented 1 year ago

It would seem that the GF_INSTALL_PLUGINS syntax has diverged between the official grafana images and the bitnami grafana distribution images that I've been testing with. I will update the docs later today, but for now, use the following syntax, which I was able to get to work locally (albeit w/ grafana OSS):

- "GF_INSTALL_PLUGINS=https://github.com/meln5674/grafana-mongodb-community-plugin/releases/download/v0.1.2/meln5674-mongodb-community.zip;meln5674-mongodb-community-plugin"
patrick-5546 commented 1 year ago

Thanks, now I can load grafana, but cannot add a mongodb data source. Everything works as expected with the bitnami image. Would you happen to know where I can mount volumes to persist data across containers for the bitnami image?

meln5674 commented 1 year ago

Based on their github, it looks to be "/opt/bitnami/grafana/data"

meln5674 commented 1 year ago

I've updated the README to point to examples for both the official and bitnami images for a variety of installation methods. Please try the one for your preferred combination and let me know if run into any further issues.

patrick-5546 commented 1 year ago

My preferred combination worked, thanks again for the help!