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

Grafna plugin not loading due to signature errors #87

Open
omerlh opened this issue Jul 25, 2023 · 7 comments
Open

Grafna plugin not loading due to signature errors #87

omerlh opened this issue Jul 25, 2023 · 7 comments
Labels
question Further information is requested

Comments

@omerlh
Copy link

omerlh commented Jul 25, 2023

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?

@denisgolius
Copy link

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 VictoriaMetrics/VictoriaMetrics#4651

@omerlh
Copy link
Author

omerlh commented Jul 25, 2023

I do not like that solution, I'll guess we'll wait until a signed plugin is ready...

@hagen1778
Copy link
Contributor

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.

@rul-hydro
Copy link

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.

@halohsu
Copy link

halohsu commented Jul 3, 2024

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"

@leandrok
Copy link

allow_loading_unsigned_plugins

It should be "plugins:", not "plugin:". Right config:

grafana.ini:
  plugins:
    allow_loading_unsigned_plugins: victoriametrics-datasource
    [...]

@hagen1778
Copy link
Contributor

@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 ?

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

No branches or pull requests

7 participants