Grafana has its own Tutorial for this but it's complex and intimidating for a beginner.
Here's my "easy way" of doing this.
Scaffolding
Get Grafana scaffolding for plugin development with,
npx @grafana/create-plugin@latest
It will ask you a couple of questions before it populates the basic stuff you need to start.
First run
Get to the folder it creates with the boilerplate code; and then run,
npm run buildto build your plugin. Then copy and paste the
distfolder to your plugins folder after renaming it with the following format
{company_name}-{plugin_id}-{plugin_type}. (On Linux/Ubuntu it is
/var/lib/grafana/plugins. Find out where it is on yours)
Working with unsigned plugins
This won't show on your Grafana plugins library before you sign it. If you want to test the plugin before signing, you can edit thegrafana.inifile to enable it for unsigned plugins.
app_mode = development
More details on allowing unsigned plugins can be found here.
Check if it works
Restart Grafana to see your changessudo systemctl restart grafana-serverMake sure you sign the plugin before you publish or turn off the development mode.
Tested on Grafana version: Version 11.2.0 locally installed on Ubuntu 22.04.4 without Docker.
No comments:
Post a Comment