Articles are paginated with only three posts here for example. You can set the number of entries to show on this page with the “pagination” setting in the config file.
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
Posts
Graph Service - Moving Forward
With the new POC implementation we could solve the current problems of the Topology in OpenNMS.
The next step is to take what was learned and implement something similar and more robust in OpenNMS.
As this is a big chunk to swallow, the main issue here is on how to split the work into small pieces, as with this kind of API you basically have to almost implement everything before it can be used.
Posts
The Topology Map in OpenNMS has some architectural problems. Mainly that there is no "service layer" implemented, which causes mostly performance issues. Besides this no API or persistence model is enforced. This prevents easy integration with 3rd party applications or even provide a new UI implementation.
Therefore I started playing around with a new Topology implementation (See issue HZN-1452) for more details). In order to not confuse it with existing implementations, it is called Graph Service or Graph Engine here.
Graph Service - Proof of Concept
Posts
In OpenNMS we use Bootstrap 3 as a library to help styling web pages. However the style sheets are customized in a way, that they are not bootstrap-compatible anymore.
Figure 1. Bootstrap 3 Default Theme Figure 2. OpenNMS customized Bootstrap 3 Theme As you can see, the custom stylings do not follow the bootstrap "schema", so each component is either not fully provided (e.g. list stylings or panels), or they are using a different context (The OpenNMS color’s indicate the severity context, whereas the bootstrap *-info, *-warning, etc.
Bootstrap 3 to 4 Migration
Posts
Hello World
public class Main { public static void main(String[] args) { System.out.println("Hello World!"); } }