Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Update to use /omk and default port of 8042

...

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:30008042/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:

...

Code Block
themeEmacs
'nmis1' => {
  'name' => 'nmis1', # what to name this server in the GUI
  'config' => 'Config.nmis', 
  'protocol' => 'http', # only HTTP is supported at this time
  'port' => '30008042', # this should be 3000, the port that omkd runs on, set in opCommon, 'omkd_listen_port'
  'host' => 'nmis1.domain.com', # the name/ip address omkd will use to connect to the server
  'portal_protocoluser' => 'httpnmismst', # the nextuser entriesomkd definewill howconnect linksto inthis the master will appearserver with
  'portal_portpasswd' => '80C00kb00k',
 #  'portal_host' => 'nmis1.alternate.com',
  'cgi_url_basethe password omkd will connect to this server with
}

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

Code Block
themeEmacs
 'localhost' => '/cgi-nmis8{
   'name' => 'localhost',
   'url_baseconfig' => '/nmis8Config.nmis',
   'userprotocol' => 'nmismsthttp', #
 the user omkd will connect to this server with
'host' => 'localhost',   
   'passwdport' => 'C00kb00k8042',
 # the password omkd will connect to this server with
}

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

Code Block
themeEmacs
 'localhost'user' => 'nmis',
   'passwd' => 'nm1888'
 },
 'vali' => {
   'name' => 'localhostvali',
   'config' => 'Config.nmis',
   'protocol' => 'http', 
   'hostport' => 'localhost8042',
   
   'port' => '3000',
   'portal_'host' => 'vali.opmantek.com',
   'portal_portuser' => '443nmismst',
   'portal_protocolpasswd' => 'https',
   'cgi_url_base' => '/cgi-nmis8',
   'url_base' => '/nmis8',
   'user' => 'nmis',
   'passwd' => 'nm1888'
 },
 'vali' => {
   'community' => 'can_be_empty',
   'name' => 'vali',
   'config' => 'Config.nmis',
   'protocol' => 'http',
   'port' => '3000',
   'host' => 'vali',
   'portal_protocol' => 'http',
   'portal_port' => '80',
   'portal_host' => 'vali',
   'cgi_url_base' => '/cgi-nmis8',
   'url_base' => '/nmis8',
   'user' => 'nmismst',
   'passwd' => 'C00kb00k' 
 }C00kb00k' 
 }

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.

...

Load the opHA dashboard (http://server_name:30008042/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.

...

opHA supports Multi-Master, that means you can have several masters collecting information from the same slaves if required.  This could be especially useful if you wanted to have one master with all groups on a slave, and another master with different groups from different slaves, 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

Code Block
'group' => 'Brisbane|Boston|Saratoga',

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

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

Code Block
'group
Code Block
'demo' => {
  'community' => 'secret',
  'name' => 'Brisbane|Boston|Saratoga',

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

Code Block
'demodemo',
  'config' => 'Config',
  'protocol' => 'http',
  'port' => '80',{
  'hostname' => '192.168.1.42demo',
  'groupconfig' => 'Brisbane|Boston|SaratogaConfig',
  'portal_protocol' => 'http',
  'portal_port' => '80',
  'portal_host' => 'demo.dev.opmantek.com8042',
  'cgi_url_basehost' => '/cgi-nmis8192.168.1.42',
  'url_basegroup' => '/nmis8Brisbane|Boston|Saratoga',
  'user' => 'nmismst',
  'passwd' => 'C00kb00k'
},

...

  • use the GUI to do a pull or push (http://server_name:30008042/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: 

      Code Block
      {
        source: "vali",
        success: "Transfer complete",
        file_name: "nmis-summary8h",
        destination: "localhost"
      },
    • On error there will be a hash entry with an error key along with information to help you solve the problem 

      Code Block
      {
        url: "http://vali:443/login",
        error: "Error signing in",
        server_signin_url: "http://localhost:30008042/omk/opHA/servers/vali/signin",
        message: "Transaction was not a success.",
        server_name: "vali"
      },
  • check the logs and watch the transfers happen
  • view the list of configured servers and check the "Last Update" column

...

Code Block
*/2 * * * * wget http://localhost:30008042/omk/opHA/servers/all/[push|pull] -o /dev/null# all servers
*/2 * * * * wget http://localhost:30008042/omk/opHA/servers/vali/pull -o /dev/null # just pull server vali

...

Code Block
package pp;

require 5;
use strict;

sub doPP { 
 system("curl -s http://localhost:30008042/omk/opHA/servers/all/pull");
 system("wget http://localhost:30008042/omk/opHA/servers/all/pull -o /dev/null"); 
 return 1;
}

...

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

Troubleshooting

...