Skip to content

savoirtech/opennms-ng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opennms-ng

-- What is OpenNMS-NG?

OpenNMS-NG is a modular imlementation of the OpenNMS monitoring stack based on OSGi. It is seriously a work in progress.

OpenNMS-NG runs in Karaf and its goal is to allow daemons and components to run in a distributed fashion. The idea is to provide persistent messaging as the backbone and allow for consumer-based event polling for obtaining messages. By implementing this style of architecture, events can be handled on multiple machine utilizing a competing consumer methodology. This allows OpenNMS to become fault tolerant with no single point of failure, and also allows it to scale massively in a horizontal capacity, theoretically allowing it to handle any load or any sized datacenter(s). This also lends itself well to cloud deployments and ability to scale based on load.

To use OpenNMS-NG you will need the following:

  • karaf (we recommend the aetos karaf stack which is a good solid version of karaf with the necessary dependencies). Which ever version of Karaf that you choose to utilize, it requires v2.3.1 or later.
  • ActiveMQ 5.7 or later
  • PostgreSQL
  • OpenNMS

Building OpenNMS-NG

Building OpenNMG-NG requires maven and Java. First do a git clone https://github.com/savoirtech/opennms-ng.git and go into the directory once checked out. Issue a mvn clean install and it should build the software.

Preparing the OpenNMS-NG runtime

OpenNMS-NG requires that OpenNMS, ActiveMQ, PosgreSQL, and Karaf(aetos) are all available. It is assumed that OpenNMS, PostgreSQL, and ActiveMQ will be running on the same machine as OpenNMS-NG. This can be changed through the etc files to make the deployment more distibuted. But for the sake of getting it running, we will assume it is all on the same machine.

OpenNMS Installation

The installation of OpenNMS is beyond the scope of this document and you should be familar with how to get it installed. The reason for its installation if for its configuration files and the database schema. Information for how to install OpenNMS can be found here. Typically OpenNMS will be installed at /opt/opennms. OpenNMS does not and should not be runnining when it comes time to execute OpenNMS-NG. But we do need to get it to install the PostgreSQL database schema and have its configuration files available. Once the database has been installed into PostgreSQL, you may shut down OpenNMS.

ActiveMQ Installation

Download a version of ActiveMQ from here. You may follow the instructions for installing and running ActiveMQ can be found here. Follow these instuctions to get ActiveMQ running.

Aetos or Karaf installation

We recommend that you use aetos since it is a karaf build with all of the necessary dependencies in it. You may checkout the latest version (master) of aetos from here. Build it with the usual mvn clean install at the root aetos directory. When it has completed building, there will be a tar.gz bunlde underneath the $AETOS_ROOT/aetos/target directory named something like "aetos-X.X-SNAPSHOT.tar.gz". Retrieve that bundle and expand it somewhere. The expnded version is your custom karaf build (aetos).

If you choose to use karaf, you may download it from the Karaf website. Just be sure the version you use is 2.3.1 or later.

From this point forward aetos and karaf will be referred to as "karaf".

Getting Karaf configuration set up

Once karaf has been expanded, we need to do a softlink to the OpenNMS installation under the karaf home directroy. cd into the karaf directory to setup the softlink. Assuming OpenNMS was installed in the default location of /opt/opennms, you would then issue the command:

ln -s /opt/opennms opennms

Doing a ls should show that it was created.

Next, we need to edit the system.properties so the JVM can get a handle on where the OpenNMS home directory is, which happens to be the softlink that we just created. Edit the $KARAF_HOME/etc/system.properties and at the bottom of the file, add the following:

opennms.home=${karaf.home}/opennms

Finally, in order to make it more simple to run our features without continually having to add the OpenNMS-NG feature url to karaf, we will add the url to the features list, which will load the list when karaf boots. Edit the $KARAF_HOME/etc/org.apache.karaf.features.cfg and at the end of the featuresRepositories</code properties file, we need to add a comma after the last mvn:org... line and add the following url:

mvn:org.opennms.ng/features/1.0-SNAPSHOT/xml/features

At this point, OpenNMS-NG should be ready to deploy

Running and Deploying OpenNMS-NG

To deploy OpenNMS-NG modules, you must have the following running on your machine:

  1. ActiveMQ
  2. PostgreSQL (with the OpenNMS schema installed)
  3. Karaf

If you do not know how to run these products, please refer to those project's websites for more information.

The available OpenNMS-NG features can be found in the opennms-ng directory. To deploy a daemon, such as eventd, we would do the following. At the karaf prompt, type in:

features:install eventd

If everything was set up and install correctly, you should see something similar to the following:

                                                    ///,        ////
 ________   ______   _________  ______   ______      \  /,      /  >.
/_______/\ /_____/\ /________/\/_____/\ /_____/\      \  /,   _/  /.
\::: _  \ \\::::_\/_\__.::.__\/\:::_ \ \\::::_\/_      \_  /_/   /.
 \::(_)  \ \\:\/___/\  \::\ \   \:\ \ \ \\:\/___/\      \__/_   <
  \:: __  \ \\::___\/_  \::\ \   \:\ \ \ \\_::._\:\     /<<< \_\_
   \:.\ \  \ \\:\____/\  \::\ \   \:\_\ \ \ /____\:\   /,)^>>_._ \
    \__\/\__\/ \_____\/   \__\/    \_____\/ \_____\/   (/   \\ /\\\
                                                            // ````
                   Integration Platform                   ((`
     Savoir Technologies - http://www.savoirtech.com
                  (version 1.3.0-SNAPSHOT)

Hit '' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '' or 'osgi:shutdown' to shutdown


karaf@savoir> features:install eventd
Refreshing bundles org.springframework.context (136), org.springframework.aop (135), org.springframework.core (132), org.springframework.context.support (137)
Adding eventlistener for jms:topic:broadcast_events?selector=uei='uei.opennms.org/internal/eventsConfigChange'
karaf@savoir>

Doing a list should show the modules working, running and ready to work ;-)

karaf@savoir> list
START LEVEL 100 , List Threshold: 50
   ID   State         Blueprint      Spring    Level  Name



[ 232] [Active     ] [            ] [       ] [   80] OpenNMS Phonebook (1.13.0.SNAPSHOT)
[ 233] [Active     ] [            ] [       ] [   80] opennms-services-bundle (1.13.0.SNAPSHOT)
[ 234] [Active     ] [            ] [       ] [   80] opennms-model (1.13.0.SNAPSHOT)
[ 235] [Active     ] [            ] [       ] [   80] opennms-config-model (1.13.0.SNAPSHOT)
[ 236] [Active     ] [Created     ] [       ] [   80] event-config (1.0.0.SNAPSHOT)
[ 237] [Active     ] [Created     ] [       ] [   80] opennms-distributed-ipc (1.0.0.SNAPSHOT)
[ 238] [Active     ] [Created     ] [       ] [   80] eventd (1.0.0.SNAPSHOT)
karaf@savoir>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages