3

I tried install this plugin to Grafana from github:

https://github.com/Vertamedia/chtable

I cloned this repository to pligins folder then added plugin to my grafana container:

grafana:
  image: grafana/grafana
  ports:
    - '3000:3000'
  environment:
    - GF_PATHS_CONFIG="grafana/etc/grafana.ini"
    - GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=vertamedia-clickhouse-datasource,vertamedia-chtable
    - GF_INSTALL_PLUGINS=grafana-piechart-panel,grafana-worldmap-panel,vertamedia-clickhouse-datasource,vertamedia-chtable

Then when I tried create new dashboard panel using this plugin get error with message:

An unexpected error happened TypeError: Cannot read property ‘emit’ of undefined

Grafana version: Grafana v7.4.3 (010f20c1c8)

My plugin is unsigned. How I can fix this error and use this plugin?

Andreas Hunter
  • 4,504
  • 11
  • 65
  • 125
  • I recently faced the similar scenario with `grafana-zabbix` plugin. I ended up creating a grafana image from a custom `Dockerfile` – Sachith Muhandiram Apr 02 '21 at 04:00
  • 1
    Can you show me your example `Dockerfile` if it is exists? I before don't created like this custom Grafana image. @SachithMuhandiram – Andreas Hunter Apr 02 '21 at 04:27

2 Answers2

3

Here I will list steps I used to install zabbix plugin to grafana container. You may try following the similar way to this plugin.

First I downloaded grafana-zabbix plugin related files from offcial github.

wget https://github.com/alexanderzobnin/grafana-zabbix/releases/download/v4.1.4/alexanderzobnin-zabbix-app-4.1.4.zip

Extract that zip file.

Then in gragana.ini you have to uncomment allow_loading_unsigned_plugins. By default its commented.

To get this grafana.ini file, I ran docker run grafana/grafana:latest and connected to that running grafana container and copied /etc/grafana/grafana.ini

[plugins]
allow_loading_unsigned_plugins = true

Dockerfile

FROM grafana/grafana:latest

COPY grafana.ini /etc/grafana/grafana.ini

COPY alexanderzobnin-zabbix-app /var/lib/grafana/plugins/
Sachith Muhandiram
  • 2,819
  • 10
  • 45
  • 94
0

Using @SachithMuhandiram's answer I was able to get a signed plugin into running Grafana container. I do realize this doesn't answer the question asked (allow unsigned plugins). However, I did land on the thread while I was researching this problem. So, I'll leave the answer here, some may find it useful.

docker run -d -p 3000:3000 grafana/grafana
docker ps -a
docker cp relative/path-to/sample_plugin [container_id]:/var/lib/grafana/plugins/
docker restart [container_id]
gurpartap
  • 375
  • 2
  • 9