You can contribute code to the OpenNMS Plugin for Grafana project via GitHub. This section describes the codebase and how to prepare your development environment.
Plugin development is done in the project’s default GitHub branch (
Commits are automatically compiled, tested, and merged to the
Releases are tagged from the
master branch and submitted to the Grafana plugin repository.
Follow these steps to prepare your development environment:
grafana.iniand configure it to allow unsigned plugin development:
app_mode = development ... [plugins] allow_loading_unsigned_plugins = opennms-opennms-app
Use Git to check out the repository:
git clone https://github.com/OpenNMS/grafana-plugin.git opennms-grafana-plugin
Navigate to your plugin directory:
Install the build and runtime dependencies:
Build the plugin to prime your
npm run dev
distdirectory to Grafana’s plugin path:
ln -s /path/to/opennms-grafana-plugin/dist /var/lib/grafana/plugins/opennms-opennms-app
Run a continuous build that watches for changes:
npm run watch
After you save a change to the plugin, refresh Grafana to load the updates.