Cannot see a "homemade" plugin

  • What Grafana version and what operating system are you using?
    Grafana v8.5.2
    OS: CentOS Linux 7 (Core)

  • What are you trying to achieve?
    I’m trying to build a panel plugin, followed these instructions: https://grafana.com/tutorials/build-a-panel-plugin/

  • How are you trying to achieve it?
    I’ve set my environment, and followed ** Create a new plugin** 1-6.

  • What happened?
    I couldn’t find the new plugin at the ConfigurationPlugins of the Grafana UI.
    searched the log for plugins, and where the configuration are taken from:
    logger=settings t=2022-05-23T12:41:26.81+0000 lvl=info msg=“Config loaded from” file=/usr/share/grafana/conf/defaults.ini
    logger=settings t=2022-05-23T12:41:26.81+0000 lvl=info msg=“Config loaded from” file=/etc/grafana/grafana.ini
    logger=settings t=2022-05-23T12:41:26.81+0000 lvl=info msg=“Config overridden from command line” arg=“default.paths.plugins=/var/lib/grafana/plugins”
    logger=settings t=2022-05-23T12:41:26.81+0000 lvl=info msg=“Path Plugins” path=/home/rnd/grafana-plugins
    logger=plugin.finder t=2022-05-23T12:41:26.86+0000 lvl=warn msg=“Error occurred when checking if plugin directory exists” path=/home/rnd/grafana-plugins err=“stat /home/rnd/grafana-plugins: permission denied”
    logger=plugin.finder t=2022-05-23T12:41:26.86+0000 lvl=warn msg=“Skipping finding plugins as directory does not exist” path=/home/rnd/grafana-plugins

tried to list the plugins using the cli:
$ grafana-cli plugins ls
Error: ✗ stat /var/lib/grafana/plugins: no such file or directory

fro that point i assumed i’m in a configuration mess which i tried to solve with no success :frowning:

  • What did you expect to happen?
  1. to see my new plugin at the grafana ui ConfigurationPlugins
  2. grafana logs - to see an info line for registering my new plugin.
  3. to list the plugins using “grafana-cli plugins ls” command
  • Can you copy/paste the configuration(s) that you are having problems with?
    /etc/grafana/grafana.ini

Directory where grafana will automatically scan and look for plugins

#;plugins = /var/lib/grafana/plugins
plugins = /home/rnd/grafana-plugins

$ ll /home/rnd/grafana-plugins
total 4
drwxrwxr-x. 6 grafana grafana 214 May 23 09:35 new-panel-plugin
drwxrwxr-x. 2 grafana grafana 29 May 23 07:45 node_modules
drwxrwxr-x. 6 grafana grafana 214 May 23 08:08 test-plugin
-rwxrwxr-x. 1 grafana grafana 86 May 23 07:45 yarn.lock

  1. why Gragana cannot find in / has permission denied to “/home/rnd/grafana-plugins”
  2. why all the plugins are located in /usr/share/grafana/public/app/plugins/ directory, while the cli looks in /var/lib/grafana/plugins directory?
  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    logger=plugin.finder t=2022-05-23T12:41:26.86+0000 lvl=warn msg=“Error occurred when checking if plugin directory exists” path=/home/rnd/grafana-plugins err=“stat /home/rnd/grafana-plugins: permission denied”
    logger=plugin.finder t=2022-05-23T12:41:26.86+0000 lvl=warn msg=“Skipping finding plugins as directory does not exist” path=/home/rnd/grafana-plugins

  • Did you follow any online instructions? If so, what is the URL?
    Ohhhh, many, but i’m a new user so i cannot publish them

welcome to the :grafana: community @saraiko!

It seems like grafana is looking in the correct directory for your plugin, but is getting permission denied.

It looks like you’ve configured the plugin directory to a specific user’s home directory, and the process might be running as a different user. I would check that the directory permissions for /home/rnd/grafana-plugins allows access. I see you listed the contents and they seem to have open permissions, but I’m wondering about the parent directory.

Thanks Melori,
The parent directory has full permissions as well (I used the -R - recursive from advance):
drwxrwxr-x. 5 grafana grafana 86 May 23 09:28 grafana-plugins

There must be another reason, but I don’t know what it is.