====== Network Group Functionality ======
Author: Michelle McCausland
===== Introduction =====
This page will outline what a network group is and how it integrates into the IDMS.
----
===== What is a Network Group ? =====
Simply put, a network group is used to denote a grouping of networks.
This is different than a cluster which is used to denote groupings of network elements based on their carrier and location.
A network group can contain networks in multiple locations and have multiple carriers.
The current implementation (June 2017) for Extenet Network groups is that they are used by venue type users in the NOC portal and EMS. See [[onboarding:snmpmanager:extenet_user_types|Extenet User Types]] for more background on user types.
----
===== How is a Network Group implemented across the IDMS ? =====
Network groups are created in the SNMP Manager and then synced to the Noc Portal - See section below on "Creating A New Network Group".
Network groups are utilised in the Noc Portal and the EMS.
Note: As part of IDMS 3.1 a large amount of development was allocated to the network group functionality in the IDMS.
==== Network Groups in the Noc Portal ====
From the front end of the Noc Portal, network groups can be viewed from the Dropdown menu in the top centre of the screen:
{{ :onboarding:snmpmanager:networkgroup1.png?nolink |}}
Selecting a network group will display relevant network elements, tickets and alarms located in the selected network group. (See IDMS 3.1 improvements)
==== Network Groups in the EMS ====
From the front end of the EMS, network groups can be viewed from the Network Group tree along the left side of the screen:
{{ :onboarding:snmpmanager:networkgroup2.png?nolink |}}
Selecting a network group will display the relevant information located in the selected network group. (See IDMS 3.1 improvements)
----
===== DB Schema =====
INCLUDE SCHEMA DIAGRAM
**Network Group Query:**
SELECT ne.id as neId, ne.name as neName, ne.ne_type, nea.id networkElementAttributeId, nea.name attributeName, nea.type_id as attributeTypeId, neat.name as attributeTypeName, ng.name as networkGroupName
FROM network_element ne
JOIN network_element_network_element_attribute nenea ON nenea.network_element_attributes_id = ne.id
JOIN network_element_attribute nea ON nea.id = nenea.network_element_attribute_id
JOIN network_element_attribute_type neat ON neat.id = nea.type_id
JOIN network_group ng ON ng.attribute_id = nea.id
WHERE ne.show_in_monitor;
----
===== Creating A New Network Group =====
**SNMP Manager**
1. In the SNMP Manager, navigate to the Network Element Attribute page and click **New NetworkElementAttribute**:
{{ :onboarding:snmpmanager:networkgroup3.png?nolink |}}
2. Fill in the attribute name and select a type of Venue:
{{ :onboarding:snmpmanager:networkgroup4.png?nolink |}}
3. Remaining in the SNMP Manager, navigate to the Network Group page and click **New NetworkGroup**:
{{ :onboarding:snmpmanager:networkgroup5.png?nolink |}}
4. Fill in the name of the network group and associate it with the Network Element Attribute you created in steps 1 & 2:
{{ :onboarding:snmpmanager:networkgroup6.png?nolink |}}
5. The next step is to assign network elements to the new network group.
As of the time of writing (June 17) this is done through the database and not the GUI. See [[https://errigal.atlassian.net/browse/IDMS-1570|IDMS-1570]] for future improvements to this process.
To achieve this through the DB you will need to insert values into the **network_element_network_element_attribute** table.
**network_element_network_element_attribute Table**
network_element_attributes_id - This field contains the ID of the network element
network_element_attribute_id - This field contains the ID of the network element attribute
* Perform a query to retrieve all of the network element ids you require to add to the network group.
* Retrieve the id of the network element attribute.
* Enter this data into an excel sheet and generate sql Insert statements from this.
Example Insert Statement:
INSERT INTO network_element_network_element_attribute (network_element_attributes_id, network_element_attribute_id) VALUES (213172, 58);
Example Excel Sheet:{{ :onboarding:snmpmanager:networkgroup7.png?nolink |}}
**Noc Portal**
6. Navigate to the NOC Portal admin section, go to the Network Group page and click the Sync with SnmpManager button:
{{ :onboarding:snmpmanager:networkgroup8.png?nolink |}}
Ensure the network group was successfully synced to the Noc Portal.