Search This Blog

Labels

adobe (1) android (3) apache (3) aviation (1) bash (2) chrome (2) composer (1) cookery (3) dev (2) dodanperks (1) extensions (1) facebook (2) firefox (1) git (2) grafana (1) guzzle (1) headaches (11) htaccess (1) html5 (2) jquery (2) lamp (1) life hacks (10) linux (28) mysqli (2) native (1) opera (2) php (10) railfanning (1) reactjs (3) reactnative (1) servers (11) sinhala (1) smartphones (2) snap (1) sound (1) tech (22) troubleshoots (4) ubuntu (29) unicode (4) virtualbox (1) wamp (2) web (11) windows (4) wordpress (3) youtube (2) කෑම (3)

Wednesday, 4 September 2024

Getting started with developing Grafana Plugins - Without Docker - The easy way

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 build
to build your plugin. Then copy and paste the
dist
folder 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 the
grafana.ini
file 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 changes
sudo systemctl restart grafana-server
Make 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