Hello, I’m new to Grafana. I have tried to create a panel plugin and modified Grafana config file locally following to Build a panel plugin. But when I tried to restart Grafana-sever again, it only showed inactive status.
However, when I tried to set by default again, it became active.
My question is how I can reload the server when I modify Grafana config file?
Can you share more details, specifically, were the modifications that you made to the config file? Also maybe the log file that will tell you how it failed (e.g.
sudo journalctl -u grafana-server -n 50)
By the way I don’t think that modifying the config file is required in order to create a new plugin. If you have a new plugin that you’d like to install, you should ideally simply copy it to Grafana’s plugins directory (rather than change the Grafana plugins directory to point to the plugin).
Thanks for your reply.
I know that we can install other plugins through the Grafana-Cli plugins by default. As I metioned above, I followed Build a panel plugin and Sign a plugin guides to register my unsigned plugin by modifying the Ganafa.ini config file. The content that I have changed is to modify the path to folder of my Grafana plugins and enable “allow_loading_unsigned_plugins” field to load my unsigned plugin.
I have registered successfully the unsigned plugin after restarting Grafana server on other computer. But I have failed when I tried to restart the server again on Ubuntu 20.0.4 and Grafana 8.0.4.
Here is the log from Grafana log:
I have fixed the problem by coping my unsigned plugin to the default plugin folder of Grafana and editing the ‘allow_loading_unsigned_plugins’ field of Grafana configuration file.
Right, glad you got it sorted. I guess you can see in the logs that the issue was that Grafana didn’t have access rights to the “new” plugins directory
Thanks for your help.
Do you know the reason why I didn’t have permission to change the “new” plugins directory path?
If I’m not mistaken the grafana server process by default runs under the
grafana user on your system. So that user would need to have access to the directory in question - and in your case the directory is a subdirectory of your user’s home, which is by default not accessible to any other users. Hence the permission denied error.
Yeah, you might be right. It seems hard to debug a plugin, when you need to copy your plugin to Grafana plugins directory by default. Debugging in super user mode may be not the good idea, right?
If you’re doing development I’d certainly recommend running Grafana in Docker rather than directly in your OS. That will give you a lot more flexibility, and you can for example dynamically “map” your plugin directory to the Grafana container.
That said, you should also be able to get things working with something like your current workflow even without Docker. You can for example keep the plugin directory under your home (and work on it there), and create a symbolic link to it in Grafana’s plugin repository - ensuring that the
grafana user also has read permissions to it. Linux in general offers quite a lot of flexibility with permissions also.
This topic was automatically closed after 365 days. New replies are no longer allowed.