Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grafana: Adding Plotly plugin via docker-compose

Working with grafana using docker-compose. I want to add the Plotly plugin so I add to my grafana container service defition, thus:

grafana:
    restart: always
    image: grafana/grafana
    container_name: fiware-grafana
    depends_on:
     - postgres
    ports:
     - "3000:3000"
    environment:
     - plugins="crate-datasource,grafana-clock-panel,grafana-worldmap-panel,natel-plotly-panel"
    volumes:
     - ./grafana:/var/lib/grafana:rw

However, when I lunch grafana from by browser I don't find this plugin available(see image below). I removed grafana image and downloaded new after adding plotly in grafana service, no change.

How do I add this plugin to Grafana via docker-compose? enter image description here

EDIT:

docker-compose file modified:

grafana:
    restart: always
    image: grafana/grafana
    container_name: fiware-grafana
    depends_on:
     - postgres
    ports:
     - "3000:3000"
    environment:
     - GF_INSTALL_PLUGINS="crate-datasource,grafana-clock-panel,grafana-worldmap-panel,natel-plotly-panel"
    volumes:
     - ./grafana:/var/lib/grafana:rw

$ docker-compose ps
        Name                      Command                  State                                Ports                          
-------------------------------------------------------------------------------------------------------------------------------
fiware-cygnus          /cygnus-entrypoint.sh            Up (healthy)   0.0.0.0:5050->5050/tcp, 0.0.0.0:5080->5080/tcp          
fiware-elasticsearch   /docker-entrypoint.sh elas ...   Up             9200/tcp, 9300/tcp                                      
fiware-grafana         /run.sh                          Restarting                                                             
fiware-iotagent        pm2-runtime bin/lwm2mAgent ...   Up (healthy)   0.0.0.0:4041->4041/tcp, 5684/tcp, 0.0.0.0:5684->5684/udp
fiware-memcached       docker-entrypoint.sh memca ...   Up             11211/tcp                                               
fiware-mongo           docker-entrypoint.sh --bin ...   Up             0.0.0.0:27017->27017/tcp                                
fiware-nginx           nginx-debug -g daemon off;       Up             0.0.0.0:80->80/tcp                                      
fiware-orion           /usr/bin/contextBroker -fg ...   Up (healthy)   0.0.0.0:1026->1026/tcp                                  
fiware-postgres        docker-entrypoint.sh postgres    Up             0.0.0.0:5432->5432/tcp                                  
fiware-wirecloud       /docker-entrypoint.sh            Up (healthy)   8000/tcp     

EDIT-2

Grafaba container log:

$docker logs -f fiware-grafana
Failed to send request: 404 not found error
Error: ✗ Failed to find requested plugin, check if the plugin_id is correct. error: 404 not found error

NAME:
   Grafana cli plugins install - install <plugin id> <plugin version (optional)>

USAGE:
   Grafana cli plugins install [arguments...]
Failed to send request: 404 not found error
Error: ✗ Failed to find requested plugin, check if the plugin_id is correct. error: 404 not found error

NAME:
   Grafana cli plugins install - install <plugin id> <plugin version (optional)>

USAGE:
   Grafana cli plugins install [arguments...]
Failed to send request: 404 not found error
Error: ✗ Failed to find requested plugin, check if the plugin_id is correct. error: 404 not found error

NAME:
   Grafana cli plugins install - install <plugin id> <plugin version (optional)>

USAGE:
   Grafana cli plugins install [arguments...]
like image 469
arilwan Avatar asked May 05 '26 13:05

arilwan


1 Answers

According to the docs, your environment should look like this:

environment:
  - GF_INSTALL_PLUGINS=crate-datasource,grafana-clock-panel,grafana-worldmap-panel,natel-plotly-panel

Works fine over here when I drop crate-datasource (which is probably something you mount inside the container yourself? If not, it's plain a wrong plugin ID.)


EDIT #1

The plugin crate-datasource relates to this unofficial datasource plugin. Because it is not an official one, you cannot install it the way you install the other plugins. Dropping this plugin from the environment part solves the problem.


EDIT #2

After all, this question is more of a CrateDB problem than a Plotly one. ;) To install the latest version of this plugin, alter your docker-compose.yml file as follows:

environment:
  - GF_INSTALL_PLUGINS=https://github.com/raintank/crate-datasource/archive/master.zip;crate-datasource,grafana-clock-panel,grafana-worldmap-panel,natel-plotly-panel
like image 123
bellackn Avatar answered May 08 '26 03:05

bellackn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!