Build from Source with Docker
This section describes how to build the OpenNMS Plugin for Grafana with Docker.
You can compile the plugin from source with a Docker build image:
Check out the repository, compile the code, and install the plugin:
docker build -t mygrafanapluginimage .
Run the image:
docker run -p 3000:3000 -t mygrafanapluginimage
Log in to your Grafana instance with the default admin credentials (
Navigate to Plugins and enable the OpenNMS Plugin for Grafana.
The Grafana plugin directory location is changed from
If you want to build the OpenNMS Plugin for Grafana based on a specific GitHub fork or branch, you can use
docker build -t mycustomforkbranch \ --build-arg OPENNMS_GRAFANA_PLUGIN_GIT_URL=https://github.com/OpenNMS/grafana-plugin.git \ --build-arg OPENNMS_GRAFANA_PLUGIN_GIT_BRANCH_REF=myBranch
This creates the plugin based on the GitHub URL and branch that you provide.
The plugin package includes an example
docker-compose.yml, which builds a service stack with a compiled OpenNMS Plugin for Grafana that you can test.
You can modify the build arguments in the file if you want to build from a specific GitHub fork, branch, or version tag.
When you first run
docker-compose up -d, the plugin is compiled from the source.
Subsequent runs will use the compiled image from your local system.
If you want to rebuild the image, run
docker-compose build --no-cache.
The URL for your Horizon or Meridian datasource is
Horizon and Meridian include templates from which you can create PDF reports. They use an existing Grafana dashboard (see Grafana Dashboard in the main OpenNMS documentation). If you want to use this feature, and you are running the OpenNMS Plugin for Grafana through Docker, you must complete additional configuration. Refer to Grafana’s remote rendering service documentation for more information.