Below you will find pages that utilize the taxonomy term “Development”
Posts
This article describes how to compile OpenNMS from source. If you have not set up your environment properly, please see here.
Checkout the Code First of all, the code should be checked out. I usually do this in my ~/dev directory:
git clone https://github.com/OpenNMS/opennms.git
This will create an opennms directory in ~/dev/opennms. Next cd into it: cd opennms.
Build from Source TL;DR Regular development
time (.
Compiling OpenNMS from Source
Posts
Here we cover what is necessary to build OpenNMS from Source and afterwards start it locally on your Mac OS system.
Compile Prerequisites In order to compile OpenNMS at least the following requirements should be met:
The latest JDK 8 version should be installed
makensis
cloned github OpenNMS repository
maven (optional)
Run Prerequisites PostgreSQL server
Jicmp, jicmp6 (both optional)
Setting up OpenNMS Development Environment (MacOS)
Posts
The other day I found my self in the lucky position to upgrade Karaf to a newer version. While doing that I also wrote something about our Http Bridge and why it was not be the best decision to integrate Karaf inside Jetty instead of the other way around.
While implementing the Upgrade I asked my self how hard could it be to get some components of now running from within Jetty to running in Karaf.
Running OpenNMS inside Karaf - Some Thoughts
Posts
Today I wanted to wire in the new GraphService into OpenNMS and have a graph:list command show a GraphML graph I sent to the /opennms/rest/graphml endpoint. The idea was to leverage the GraphmlRepository to also store a configuration file for a new GraphMLGraphContainerProviderServiceFactory implementing a ManagedServiceFactory. Basically the same as we already do with the GraphMLTopologyFactory
I wired everything together and was also able to install the features. However as soon as I send the graphml document to the rest endpoint via (of course OpenNMS should be started)
Don't export the same package as another bundle
Posts
While working on the persistence for the new graph service I encountered a weird behaviour: Each time a persisted graph is altered the edges were removed. So I investigated and it turns out if you are using hibernate inheritance in combination with the @Where clause hibernate only persists the entities which have been modified and removes the relation to the others, but keeps the entities sigh.
For more clarity, here is the original code
Hibernate - Using multiple relations using @Where does not update properly
Posts
Show config from Karaf Shell
Sometimes it is required to show a (bundle) configuration from the Karaf Shell. This may be on OpenNMS, Minion or Sentinel.
First of all a connection to the Karaf Shell must be made. Here is described on how to do this. The according ports can be found here.
Now let’s assume we want to see the current values of the id, location and other settings on Minion. First of all we need to know in which cfg file the property is located.
Posts
Default SSH Ports
Here I explained on how to connect to the OpenNMS Karaf Shell. However when connecting to Sentinel or Minion the ports are different.
The following table shows the default ports for each system
System
Port
OpenNMS
8101
Minion
8201
Sentinel
8301
Posts
OpenNMS uses Apache Karaf under the hood and in some cases (especially during development) it is required to connect to the OpenNMS Karaf Shell.
First of all OpenNMS must be started to connect to the Karaf Shell. I usually start OpenNMS with the -v (verbose) and -t (debug) options:
$OPENNMS_HOME/bin/opennms -vt start Afterwards I check with
$OPENNMS_HOME/bin/opennms -v status until the Jetty Webserver is STARTED, as the Karaf Container is started by the Webapp itself.
Connecting to the Karaf Shell
Posts
One user in the community is using the GraphML Topology and asked me in chat if it were possible to add tooltips to a vertex from within a groovy script.
Short answer: Yes
Long answer By default, setting the tooltip is supposed to work only by setting it directly in the graphml file itself. The official documentation for this says, that the name of the attribute is tooltipText. So if you are looking for static tooltips, that is the way to go.
Dynamic GraphML Tooltips