Child pages
  • opHA2 Installation and Configuration Guide
Skip to end of metadata
Go to start of metadata

Installation Prerequisites

  • The individual performing this installation has a small bit of Linux experience.
  • Root access is available.
  • Internet access is required for installing any missing but required software packages.
  • NMIS must be installed on the same server that opHA is being installed on.
  • You will need a license for opHA ( CONTACT US for an evaluation license ).
  • opHA has to be installed onto the Master and each Poller NMIS server.


Installation Steps

Transfer the opHA tarball onto all servers in question, the Master and all the pollers; either by direct download from the Opmantek website, or from your desktop with scp or sftp or a similar file transfer tool. Repeat the following steps for each involved server:

  • Become root and unpack the tarball:

  • Start the interactive installer and follow its instructions:

  • The installer will interactively guide you through the steps of installing opHA. Please make sure to read the on-screen prompts carefully.
  • When the installer finishes, opHA is installed into /usr/local/omk, and the default configuration files are in /usr/local/omk/conf, ready for your initial config adjustments.
  • A detailed log of the installation process is saved as /usr/local/omk/install.log, and subsequent upgrades or installations of other Opmantek products will add to that logfile.
  • For detailed information about the interactive installer please check the Opmantek Installer page.
  • a small warning: the installer may warn about two "incorrect checksum detected" for two files, if you install this version on top of the Opmantek Virtual Appliance version 8.5.6G or after other Opmantek applications that were released since opHA 2.1.1. These warnings are benign and you can safely confirm that the installer is allowed to 'overwrite' those files.

Enter License and accept EULA

If the daemon is loaded and the installation has gone well you should now be able to load the opHA GUI, from http://server_name:8042/omk/opHA. This URL should present you with a webpage that allows you to enter a license key and accept a EULA.  This step will need to be completed on each opHA instance.  After successful license key and EULA acceptance you will be presented with a dashboard that looks like this:

opHA Authentication Model

The opHA daemon is configured with:

  • An opHA user and password, by default this is an Apache htpasswd file, defined in /usr/local/omk/conf/users.dat.
  • The opHA user to use for the authentication, defined per Server in /usr/local/nmis8/conf/Servers.nmis (on the master if they are pulling, for the pollers if they are pushing)
  • An IP address list that defines who is allowed to connect to the daemon (depending on the operation a combination of ip address and login credentials is required)

This model enables you to use separate credentials for each poller or the same credentials for each poller, providing for simple configuration, and more secure configuration if required.

opHA Configuration

Server Name for opHA

Server names need to be lower case with no spaces, e.g. NMIS_Server24 is bad, nmis_server24 is good.

Now set the server name in Config.nmis, search for server_name: 

Add Servers to Servers.nmis

opHA supports pollers pushing updates or masters pulling updates (or both).  If you want a poller to have the ability to push, it needs to have the servers it should push to in it's Servers.nmis file.  Conversely if you want masters to be able to pull they need to have the pollers they should pull from in their Servers.nmis file.  At this point it is good to draw yourself a diagram (if you have not already) to aid you in configuring each master and poller.

In addtion: each server (master and poller) needs to have a localhost entry in Servers.nmis which tells the server how to log in to itself. NB: it must be 'localhost' in both the key and name portions, will not work!

The Servers nmis file is located at /usr/local/nmis8/conf/Servers.nmis, you will need to add a section for each server the daemon will be connecting to.  The NMIS GUI can help you create these entries, to use it load up NMIS on the server you are configuring, and select "System->System Configuration->Servers" from the menu.

Important Notes:

  • the name (key) cannot contain / or . and must match what is in the key (which is the first line opening each settings bracket 'key' => {
  • if the name refers to an NMIS Poller server, it should match the setting in 'server_name' mentioned above.
  • host must be a FQDN if it is not an IP (try using if localhost does not work)

The default entries look like this:

Please read the COMMENTS for each entry CAREFULLY

Edit the entry to look like this, in this example the hostname of the poller is "vali":

There are many options in this configuration but unless you are wanting to change the defaults considerably most of them will not matter.  Currently using HTTPS is not supported in the protocol section.  You can use different user and passwd permissions here.

If you were presenting the poller and needed to use an alternate connection, e.g. through a reverse proxy for presenting a portal, you would modify the portal_protocol, portal_port and portal_host accordingly.

Configure Authentication

  • To add new users see the documentation here for adding users to htpasswd, the htpasswd file for opHA is in /usr/local/omk/conf/
  • After you have the users configured you will need to modify /usr/local/omk/conf/opCommon.nmis, find the line "'opha_allowed_ips' => [''] and add the IP addresses of the opHA servers that are allowed to connect to the server you are configuring.

The ohha_allowed-ips entry contains an array of IP addresses. Each entry must be enclosed with single quotes and separated by commas. Failure to properly format this line will prevent the push/pull of data, although the Test Connection may pass. See the example below:

For example, if we want to allow the servers at and to connect to this server, we add them to conf/opCommon.nmis like this:

NB!! : Restart the daemon (needed after any config change) 

Testing Server Connections

Load the opHA dashboard (http://server_name:8042/omk/opHA/) and from the top menu, select "Views -> Servers".  You should now be presented with a list of servers that you have configured for this opHA instance.  There will be a column with links named "Test Sign In", select the server you would like to test, on successful sign in you will be presented with a page that says "Login Success".  If you do not see this you will get an error giving you a hint at what is happening.  You can use the logs in /usr/local/omk/log to help you determine what the issue is.

Refreshing the servers page after a successful signin will show the date of the last successful signin (as well as the last login error and last update).

IMPORTANT: If the date of either of your servers is not correct you will have an error signing in

Promoting NMIS to be a Master

By default, an NMIS server operates in standalone mode (which is also poller mode), to have NMIS behave in a masterly fashion, you will need to modify the configuration, so you can edit the NMIS Configuration item "sever_master" using your favourite text editor, edit this line and change from "false" to "true".

Adding Poller Groups to Master

On each poller you will need to determine which groups are currently in use.

This will result in a list of groups which need to be added to the NMIS Master, edit /usr/local/nmis8/conf/Config.nmis and add these groups to that list, this is a comma separated list.


You can also use the admin script /usr/local/nmis8/admin/ on the master to find and patch all groups used by all devices imported from the pollers, it can even be added to cron to automate group updates.

Once opHA has succesfully pulled/pushed the devices from poller to master you can analyse and patch the groups list by using the following. usage


Limiting Master Group Collection

opHA supports Multi-Master, that means you can have several masters collecting information from the same pollers if required.  This could be especially useful if you wanted to have one master with all groups on a poller, and another master with different groups from different pollers, effectively sharing some information between groups.

To do this you use the group property in the Servers.nmis file.  Edit the file and add the group property in and a regular expression in for the groups, this will take the form

This will match all groups contain the sub-strings, Brisbane, Boston or Saratoga.  A complete server entry would look like this.

Test Push/Pull

There are several ways to verify that the transfers are working correctly:

  • use the GUI to do a pull or push (http://server_name:8042/omk/opHA/), select the server you want to push to or pull from (or select all to test them all) and press the appropriate button
    • the output will be a JSON document, with a hash entry for each successful file transfer: 

    • On error there will be a hash entry with an error key along with information to help you solve the problem 

  • check the logs and watch the transfers happen
  • view the list of configured servers and check the "Last Update" column

Running a Master Collection

There are two options to run opHA, using Cron or a as a post process after a NMIS does a collect.  Pushes and pulls can be requested from anywhere, if they are requested from the localhost no authentication is required, if they are requested from elsewhere authentication is required.

Before you start make sure you have this in Config.nmis

To run from cron add this to an appropriate file in your /etc/cron.d/ directory (you could create a new one or re-use your nmis file). This line will push or pull (depending on which one you pick) to a server, for example to server "demo":

This will get your collections running every 2 minutes regardless of any other polling operations.

If you want to run the opHA transfers immediately after an NMIS collect, we recommend that you add the wget line to your NMIS cron schedule, for example like this:

Alternatively, if you use NMIS 8.5.6G or newer you can use its plugin system to hook into the post-collect phase and execute Perl code of your choice then.



Logs can be found in /usr/local/omk/log or also viewed from the GUI at http://server_name:8042/omk/opHA/logs


  • check the logs in /usr/local/omk/logs/.
  • restart the daemon (required after any config changes)
  • run daemon from command line and see if the terminal has any helpful errors:


After refreshing the web pages on the NMIS Master server you will see the data from the pollers.

  • No labels