Grafna plugin not loading due to signature errors
Hey, I am deploying Grafana using the helm charts. I followed the readme to add the plugin and now I am seeing this error:
grafana-85f9d7b445-lsbbc grafana logger=plugin.loader t=2023-07-25T07:08:19.151240781Z level=warn msg="Skipping loading plugin due to problem with signature" pluginID=victoriametrics-datasource status=unsigned
Grafana version: 7.85.0
I could find this thread but it seems a bit bad practice either running Grafana in dev mode or doing the allow unsigned. Have you encountered this issue before?
Hi @omerlh ! For using unsigned plugins in Grafana you need to set the next variables:
"GF_ALLOW_LOADING_UNSIGNED_PLUGINS=victoriametrics-datasource"
"GF_DEFAULT_APP_MODE=development"
See also https://github.com/VictoriaMetrics/VictoriaMetrics/pull/4651
I do not like that solution, I'll guess we'll wait until a signed plugin is ready...
Hi @omerlh! Signing the plugin is a procedure that requires a significant amount of money to be paid annually to Grafana organization. We discovered this only after we submitted the plugin for signing since Grafana's guides and docs do not mention this anywhere. So this came as a surprise, and we decided to postpone the signing until we're sure it is worth it.
I believe you don't need the APP_MODE=development switch. My installation is running fine with these settings in grafana.ini:
app_mode = production
[plugins]
allow_loading_unsigned_plugins = victoriametrics-datasource
The README.md does not mention development mode, so we should clarify this here as well. Maybe @omerlh is ready to try out the plugin under these conditions.
Friends who encounter this problem try to use the Prometheus protocol in Grafana.
Grafana Helm Yaml:
grafana.ini:
plugin:
allow_loading_unsigned_plugins: victoriametrics-datasource
extraInitContainers:
- name: "load-vm-ds-plugin"
image: "curlimages/curl:7.85.0"
command: [ "/bin/sh" ]
workingDir: "/var/lib/grafana"
securityContext:
runAsUser: 472
runAsNonRoot: true
runAsGroup: 472
args:
- "-c"
- |
set -ex
mkdir -p /var/lib/grafana/plugins/
ver=$(curl -s https://api.github.com/repos/VictoriaMetrics/victoriametrics-datasource/releases/latest | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' | head -1)
curl -L https://github.com/VictoriaMetrics/victoriametrics-datasource/releases/download/$ver/victoriametrics-datasource-$ver.tar.gz -o /var/lib/grafana/plugins/plugin.tar.gz
tar -xf /var/lib/grafana/plugins/plugin.tar.gz -C /var/lib/grafana/plugins/
rm /var/lib/grafana/plugins/plugin.tar.gz
volumeMounts:
# For grafana-operator users, change `name: storage` to `name: grafana-data`
- name: storage
mountPath: /var/lib/grafana
cat /etc/grafana/grafana.ini Result:
[plugin]
allow_loading_unsigned_plugins = victoriametrics-datasource
Grafana pod logs:
logger=plugins.signature.validation t=2024-07-03T03:56:01.355033782Z level=warn msg="Skipping loading plugin due to problem with signature" pluginId=victoriametrics-datasource status=unsigned
logger=plugins.validation t=2024-07-03T03:56:01.35504498Z level=error msg="Plugin validation failed" pluginId=victoriametrics-datasource error="plugin 'victoriametrics-datasource' has no signature"
allow_loading_unsigned_plugins
It should be "plugins:", not "plugin:". Right config:
grafana.ini:
plugins:
allow_loading_unsigned_plugins: victoriametrics-datasource
[...]
@omerlh is this issue still valid for you? If yes, have you tried following https://github.com/VictoriaMetrics/victoriametrics-datasource?tab=readme-ov-file#installation ?
Related ticket https://github.com/VictoriaMetrics/victoriametrics-datasource/issues/233
Please see updates in https://github.com/VictoriaMetrics/victoriametrics-datasource/issues/233
Plugin is now signed and available here https://grafana.com/grafana/plugins/victoriametrics-metrics-datasource/