'Host Groups', accessible from the Configuration menu is the place where you can organize your hosts in logical groups.
On the first load of the 'Host Groups' page, you are presented with a single Host Group.
The 'root node' of the tree is called 'Opsview'. This is determined automatically on installation; however, you are free to rename this. It is not visible within the 'Monitoring' views, but it can be used within Notifications, access controls and more (as outlined earlier).
This page enables many actions, namely:
Renaming a Host Group
Adding a Host Group
Moving a Host from one Host Group to another
Moving a Host Group from one Host Group to another
Deleting a Host Group
Viewing/adding notes to a Host Group
All these changes will require to be applied to production by using the 'Apply Changes' functionality. Most changes that are made in this page will prompt the 'pending' label are now visible which indicates that while the changes have been made they are not yet 'applied' to production. Clicking on the 'Apply Changes' link in the bar above the host groups area will take you to the ['Apply Changes' page](🔗).
## Renaming a Host Group
To rename a Host Group click on the contextual menu and click 'Rename'.
A modal window will appear asking for the new name, at which point you can choose to modify the text and click 'Submit'.
Rename the Host Group and click 'Submit'.
## Adding a new Host Group
To add a new Host Group click on the contextual menu of the Host Group to which you wish to add a sub-Host Group and select 'Add child'.
**Note**: a Host Group can only contain Hosts **OR** Host Groups, therefore the 'Add child' option will not be available for Host Groups already containing Hosts.
Name the Host Group and click Submit.
## Moving a Host from one Host Group to another
You can drag hosts from either the left-hand tree panel or the right-hand list of hosts.
Select which hosts you want to move by clicking on a specific host and then press and hold ALT or SHIFT to select multiple hosts. On the right-hand side, you can also click and drag to select a group of hosts:
The left-hand tree panel and the right-hand side list will stay in sync. You can only select hosts from a single host group.
When you start dragging, Opsview will disable all the host groups on the left-hand side that you cannot drop the hosts onto - hosts can only be dropped onto leaf host groups. If you hover over an unopened host group, it will automatically open.
After dropping hosts onto a valid host group, the hosts will be moved. If you have [Change Log](🔗) enabled then you will be prompted to fill in your reason for the move.
On success, a notification in the top right will appear:
Note: You need to have CONFIGUREHOSTS and CONFIGURESAVE to be able to move hosts.
## Moving a Host Group from one Host Group to another
You can drag a host group in the left-hand tree to place into another part of the tree. Only a single host group can be moved at a time.
When you start dragging, Opsview will disable all the host groups that you cannot drop your dragged host group onto - host groups that already contain hosts cannot contain any host groups:
After dropping the specific host group, Opsview will save the action. If you have Change Log enabled, you will be prompted to fill in your reason for the move. On success, a notification in the top right will appear.
Note: You need to have CONFIGURESAVE to be able to move host groups.
## Deleting a Host Group
To delete a Host Group click on the contextual menu of the Host Group you wish to delete and click on the 'Remove' icon.
**Note**: You cannot delete a Host Group while it contains one or more Hosts. To delete the Host Group, you must first move all of the Hosts to a different Host Group before attempting to delete.
Then confirm the deletion of the Host Group:
## Viewing/Adding Notes to a Host Group
Notes can be viewed/added to a Host Group from within a variety of Opsview Monitor sections, one of which is the Host and Host Group Organizer.
Notes are a useful way to tell other administrators and Opsview Monitor Users about the Hosts within a Host Group. These notes can tell you who is responsible for the Hosts, what the subnet/VLAN information is, etc.
To add and view notes, click on the contextual menu against a Host Group and select 'Notes' as below. The notes can be formatted using the WYSIWYG editor within the browser which enables a true rich-text experience.
Click the contextual menu and then click on 'Notes'
After an edit click 'Submit' to save the updates.