...
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 files file would override the configuration that the poller has.
Requirements
- NMIS 9.0.6 is required6
- opHA version 3.0.5
- The pollers also need to be updated with at least opHA version 3.0.5 of or above
Configuring opHA
How does it work
opHA 3.0.5 has the main key points:
...
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: With contains all Pollers - which contain all the peers
- Primary : With - 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)
- Assign peers to a group
- Assign group to a configuration file
- Push the configuration file: . The file will be send sent to the peers and restart .
- Restart the daemons when needed required (You you will see a message when it is necessary).
Also, you You can also map a role with a peer. By default, the following roles are available:
'Poller', 'Primary', 'Portal', 'Local'
...
Primary
Portal
Local
And these roles are assigned:
- Primary: Server Local
- Poller: All existing peers available
Configuration files
...
Viewing configuration files
...
Accessing from On the menu Views > Configuration > Cluster Configuration page, we you can see a list of the configured files.
...
Creating a new configuration file
...
We can create To start creating a new configuration file clicking on the button "New Configuration File":
We would need to introduce:
...
, 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.
- The Select the file subtype: We . You can only choose the a file subtype depending on the file type you have selected above.
- Specify a file name. The file name (Cannot be empty and had .nmis extension).
...
- 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).
...
- The file is edited in json format, but it is being saved as a perl hash. We You can download the file as it is being saved from by clicking the Download File button.
- We You can remove/add sections when we if you have selected the Section "all".
- We can validate the file before being saved. If it is not valid, we will see the output on the console on the bottom.
- 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 is going to will create a backup file, with a maximum of two.
Push a configuration file
...
Accessing To view a list of configured files, from the menu, click Views > Configuration, we can see a list of the configured files. Pressing the Peer Group > Push button, we can push a and open the Cluster Configuration page.
Click the Push button icon to push the required configuration file to the configured groups.
A note will be display when some daemons would On the "Send configuration file to peers" window that opens, you can see if any daemons need to be restarted.
Once a configuration is Push, you will be able to see the Log as the result pressing on the status button:Click the Push button to complete the configuration push. Open the Log to see the push status and errors, if any.
Remove a Configuration file
...
Accessing from the menu Views > Configuration, we can see a list of the configured files. Pressing the > Remove button, we can remove file from the peers where the file was successfully sentTo 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.
View the resulting configuration
...
We can To see the result configuration of a peer files from , click the menu "View Configuration file":Conf. file button.
Select the peer:.
And select the file from the file browser:.
Groups
Add a peer to a group
We can add a peer to a group on the button Peers Group from the Configuration menu.
...
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.
To edit the group members, we need to select the group, click Edit, and change the group members. Then, press add/edit members in an exiting group, select the Group and click the Edit icon above the table.
On the "Add group members" window that opens, add, edit, or remove the peers and click Save.
To edit the groups, we need to press the button Edit Groups.
Create a new Group / Edit Groups
We can edit groups on the button Edit Groups from the Peers Groups menu.
...
You can edit, add or remove existing groupsTo create a new group or edit an existing group, on the Views > Configuration > Peers Groups page, click the Edit Groups icon.
To create a new group, click the Create icon.
To edit or delete an existing group, select the group and use the respective icons above the table to edit/delete them.
Please be aware that, if you remove a group, all group associations will be lost.
...
Assigning a Group to a Config file
Accessing from the menu Views > Configuration, we can see a list of the configured files. Pressing the Peer Group > Edit button, we can add groups to a configuration file to be send that file.You can assign a group to a Configuration file on the Views > Configuration > Cluster Configuration page. Click the Edit icon against the required configuration file and add groups on the "Select groups to apply to this config file" window.
Roles
Role Mapping
...
We can To assign a peer to a role on , click the Role Mapping button Role Mapping from from the Configuration menu:.
We On the Role Mapping page that opens, you can add new mappings, edit or remove the existing ones.
Note that if a peer has a role assigned, it is will not going to appear in under the add button, ; you will need to edit it.
What Central Managed Means
Please note that once we after you change the NMIS or OMK configuration from the Primary, it is shall not intended to be edited from the its own poller.
If a peer role is set to be a poller, opHA menu is will not going to be available:
When we you update the configuration in NMIS from a Primary, we are going to see a message you cannot edit/update the config from NMIS (on the NMIS configuration screen, and we are not going to be able to update the configuration from NMIS).
Restoring a Backup
By opHA, by default , saves two backup files are saved in the every poller in the directory <nmis>/backups
directory or <omk/conf/conf.d/backups>
directory. This configuration can be changed in the configuration file:You can change the backup location by editing the opha_backup_master_location
...
The file.
Similarly, you can also change the number of backup files can also be changed in the configuration file, modifying the configuration item:by modifying the same in opha_max_backup_files
.
Restoring a backup should can only be done manually, in each poller where the restoration needs to be done, following the steps:required. To do so -
- Go to the backup directory in the Primary. By default:, the backup directories are -
- NMIS:
<nmis>/backups
- OMK:
<omk/conf/conf.d/backups>
.
- NMIS:
- The backup file should would be named in the file_name.nmis.version format. For example, authentication.nmis.3.
- Rename Remove the version number from the file , removing the versionname. For example, authentication authentication.nmis.
- Move the file to the external configuration folder. By default :-
- NMIS:
<nmis>/conf/conf.d
- OMK:
<omk>/conf/conf.d
- NMIS:
- For some of the changes to take effect, the corresponding daemon should be restarted. For example:
- service nmis9d restart
...
- <omk>/bin> ./opha-cli.pl act=cleanup : The purpose is cleaning Primary files and metadata. Must be run from the Primary. Will check for:
- Metadata without a file associated in the file system
- Orphan files in the file system
- Backup files
- <omk>/bin> ./opha-cli.pl act=cleanup_poller : The purpose is cleaning poller files. Will check for:
- Orphan backup files from OMK.
- Check for duplicated configuration items in OMK: This means that there is the same configuration item in different configuration external files. This could led us to errors, as the one which is loaded first is going to override the other.
- Check for duplicated configuration items in NMIS.
- <omk>/bin> ./opha-cli.pl act=clean_orphan-nodes : Will remove the nodes with no cluster_id associated. Will ask for confirmation for each node if simulate=f is specified.
Important: cleanup Cleanup utilities run in simulation mode by default. It is a good practice to run as simulation to check all the files that are going to be removed. simulate=f
will remove all files and metadata.
...
- Backup files are saved, but it is not possible to rollback from the GUI. By default, configuration files have 2 backup files.
- Once you edit NMIS configuration, it is not possible to edit from the GUI. You will see a message when there are some configuration files overriding the local configuration.
- If the daemon is going to be restarted, it is not going to see the result on the log. But we you can check the opHA landing page to see the daemons daemon's state.