Magnum destination monitor collector is designed for the inSITE Poller program python module. The destination monitor collector uses the Magnum GraphQL API to query for SDVN destinations and source routing assignment. A custom dashboard is included to display destinations in an "airport view" fashion.
This module uses the Magnum SDVN destination tagging feature to query for only destinations that match a tag value.
The destination collection module has teh below distinct abilities and features:
- Collects destination namesets names.
- Uses the Magnum OIDC authentication.
- Resolves the source device to a supplied nameset.
- High level "airport view" dashboard to show destination and source assignment.
- inSITE Version 11 and service pack 2.
- Magnum SDVN System supporting keycloak and GraphQL API
- Python3.7 (already installed on inSITE machine)
- Python3.7 Requests library (already installed on inSITE machine)
Installation of the module requires copying the script module into the poller modules folder:
-
Copy destination_monitor.py script to the poller python modules folder:
cp scripts/destination_monitor.py /opt/evertz/insite/parasite/applications/pll-1/data/python/modules/
-
Restart the poller application
To configure a poller to use the module start a new python poller configuration outlined below
-
Click the create a custom poller from the poller application settings page
-
Enter a Name, Summary and Description information
-
Enter the Magnum Server IP in the Hosts tab
-
From the Input tab change the Type to Python
-
From the Input tab change the Metric Set Name field to magnum
-
From the Input tab change the Freqency value to 300000 (5 minutes)
-
Select the Script tab, then paste the contents of scripts/poller_config.py into the script panel.
-
Update the below argument with the correct Magnum SDVN Cluster IP address and inSITE Nature name.
- Update the params argument with the client_id and secret information with the Magnum keycloak information.
- Configure a tag to match destinations in the "tags" field.
- Change the nameset to a different name if one is needed.
params = {
"magnum": hosts[-1],
"client_id": "insite-poller",
"secret": "secret",
"tags": ["-ENC-NOC"],
"nameset": "Global",
}
- Save changes, then restart the poller program.
The destination_monitor script can be ran manually from the shell using the following command with arguments
python destination_monitor.py [-h] -host <ip> [-client <client-id>] -secret <secret> [-name <nameset>] -t ENC-NOC TOC-NOC [ENC-NOC TOC-NOC ...]
Displaying the help command output
python .\destination_monitor.py -h
usage: destination_monitor.py [-h] -host <ip> [-client <client-id>] -secret <secret> [-name <nameset>] -t ENC-NOC TOC-NOC [ENC-NOC TOC-NOC ...]
Magnum Destination Poller
options:
-h, --help show this help message and exit
-host <ip>, --magnum-host <ip>
Magnum IP Address
-client <client-id>, --client-id <client-id>
Client ID in Magnum OIDC Credentials (default: 'insite-poller')
-secret <secret>, --secret-key <secret>
Secret Key from the Magnum OIDC Credentials
-name <nameset>, --nameset-name <nameset>
Nameset used to get the source label from (default: 'Global')
-t ENC-NOC TOC-NOC [ENC-NOC TOC-NOC ...], --tags ENC-NOC TOC-NOC [ENC-NOC TOC-NOC ...]
Tags used to match destinations
Below are the summarization documents that are auto generated:
{
"fields": {
"s_dest_id": "a15a1cb5-d34c-5df0-98da-f3ebc05991ee",
"s_dest_name": "XPT-ATL-NOC_RTR-VID-DST-46",
"as_tags": [
"ENC-ATL-NOC",
"ENC",
"ES-ROUTE",
"ES-ENC-NOC"
],
"s_src_name": "XPT-ATL-NOC_RTR-VID-SRC-1124",
"s_src_id": "18bd5ba9-ee0f-5d71-8635-4881bd237d16",
"s_src_name_resolved": "NGMC ITXE 12",
"s_src_name_nameset": "Global",
"s_long_name": "ATL LIVE 30 ENC SEC",
"s_short_name": "ATL LIVE 30 ENC SEC",
"s_global": "ATL-NOC-ATEME-DCT10-03-VID-DST-6"
},
"host": "1.1.1.1",
"name": "dst_mon"
},
{
"fields": {
"s_dest_id": "fc291890-4fa4-52e7-a129-a84efa4812ff",
"s_dest_name": "XPT-ATL-NOC_RTR-VID-DST-48",
"as_tags": [
"ENC-ATL-NOC",
"ENC",
"ES-ROUTE",
"ES-ENC-NOC"
],
"s_src_name": "",
"s_src_id": "",
"s_src_name_resolved": "",
"s_src_name_nameset": "",
"s_long_name": "ATL LIVE 32 ENC SEC",
"s_short_name": "ATL LIVE 32 ENC SEC",
"s_global": "ATL-NOC-ATEME-DCT10-03-VID-DST-8"
},
"host": "1.1.1.1",
"name": "dst_mon"
}