最近在看pmm的實現,因為pmm 的dashboard 是基於grafana的,所以就整理了一些關於grafana開發的一些資料
官方參考文檔
https://grafana.com/docs/grafana/latest/developers/developer-resources/
擴展開發的一些技術參考
https://grafana.com/tutorials/
一些說明
官方推薦的是使用grafana-toolkit 來開發擴展,同時也可以方便的進行構建以及打包,注意早期版本是基於angular 開發的,官方推薦的是
基於react的開發,同時早期版本的還是支持的,對於開發的擴展的測試,推薦的運行方式是容器
參考運行
docker run -d -p 3000:3000 -v "$(pwd)"/grafana-plugins:/var/lib/grafana/plugins --name=grafana grafana/grafana
同時grafana 常見的開發模型包含了datasource,panels 以及apps
參考資料
https://grafana.com/docs/grafana/latest/plugins/developing/development/
https://grafana.com/tutorials/build-a-panel-plugin/#2
https://grafana.com/docs/grafana/latest/plugins/developing/apps/
https://grafana.com/docs/grafana/latest/plugins/developing/panels/
https://grafana.com/docs/grafana/latest/plugins/developing/datasources/
https://github.com/grafana/simple-app-plugin