opHA 3 - Centralised configuration

opHA 3 - Centralised configuration

Introduction

Managing and monitoring a large network of devices requires a scalable, high availability and easy to manage solution. opHA 3.0.5 brings a new feature that allows you to centralise the configuration files from the Primary and send it to the pollers. The configuration files can be applied in NMIS and OMK. This partial configuration file would override the configuration that the poller has. 

Requirements

  • NMIS 9.0.6 

  • opHA version 3.0.5

  • The pollers also need to be updated with opHA version 3.0.5 or above

Configuring opHA

opHA configuration consists of the following steps:

  • Create a configuration file from a template (NMIS or OMK)

  • Validate and save the file

  • Create a group. By default, the following groups are created:

    • Pollers - which contain all the peers

    • Primary - which contain the local machine (this is configured with opha_hostname in /usr/local/omk/conf/opCommon.json. If you set this, you must also set opha_url_base and nmis_hostname)

    • Main Primary - which monitors itself and the pollers. 

  • Assign peers to a group

  • Assign group to a configuration file

  • Push the configuration file. The file will be sent to the peers.

  • Restart the daemons when required (you will see a message when it is necessary). 

You can also map a role with a peer. By default, the following roles are available: 

  • Poller

  • Primary

  • Portal

  • Local

And these roles are assigned: 

  • Primary: Server Local 

  • Poller: All existing peers available

Configuration files

Viewing configuration files


On the Views > Configuration > Cluster Configuration page, you can see a list of configured files.

Creating a new configuration file


To start creating a new configuration file, go to View > Configuration and click the New Conf. File button on the Cluster Configuration page.

On the "Create New Configuration file" window that opens -

  • Select the file type - NMIS or OMK. It is very important to select the right type, as it is going to be applied on different products. 

  • Select the file subtype. You can only choose a file subtype depending on the file type you have selected above. 

  • Specify a file name. The file name must end with an appropriate extension - .nmis or .json - depending on the file type selected above.

Click Create
This will open the template in an editor. A generic templated will be loaded if the file is not opCommon (OMK) or Config (NMIS).

Important considerations:

  • The file is edited in json format, but it is being saved as a perl hash. You can download the file as it is being saved by clicking the Download File button. 

  • You can remove/add sections if you have selected the Section "all". 

  • Click Validate and see the Console Output below the editor, to know if the file you have edited is valid or not. 

  • After validating, Save the file. By default, once the file is saved, it will create a backup file, with a maximum of two.

Pushing a configuration file


To view a list of configured files, from the menu, click Views > Configuration and open the Cluster Configuration page.

Click the Push button

icon to push the required configuration file to the configured groups.

On the "Send configuration file to peers" window that opens, you can see if any daemons need to be restarted. 

Click the Push button to complete the configuration push. Open the Log to see the push status and errors, if any. 

Removing a configuration file


To remove a configuration file from the peers it was successfully sent to earlier -

  • Open the Cluster Configuration page from Views > Configuration.

  • Press the Remove

    icon against the required configuration file under the Actions column. 

  • On the "Remove configuration file from peers" window that opens, select the peers from which you want the file to be removed and click Remove.

Viewing the resulting configuration


To see the result configuration of a peer, click the View Conf. file button.

Select the peer.

And select the file from the file browser.

Groups

Adding/Editing Peers in a Group


To add/edit a peer in a group -

  • Access the Cluster Configuration page from Views > Configuration

  • click the Peers Groups button in the menu.

  • On the Peers Groups page that opens, you can see all the groups available and the peers added to them.