Tagging SDWAN Tunnel with specific attribute after discovery in VNA domain
search cancel

Tagging SDWAN Tunnel with specific attribute after discovery in VNA domain

book

Article ID: 435900

calendar_today

Updated On:

Products

Network Observability CA Performance Management Virtual Network Assurance

Issue/Introduction

We have a VNA plugin configured for VERSA SDWAN tunnel performance monitoring. After discovery, the tunnels need to be tagged with specific custom attributes such as customer name, customer code, and tunnel type.

Currently, these attributes are not populated automatically after tunnel discovery. We require an automated mechanism—either within the VNA plugin or through an external process—to populate these attributes once the tunnels are discovered.

For example:

Tunnel Name:

My-Company-Limited_XX-MySite--INET

Required Custom Attributes:

  • customer_name: My_Company

  • customer_code: 123

  • tunnel_type: Primary

The automation should parse the tunnel information and automatically populate the relevant custom attributes so they can be used for grouping, reporting, and monitoring purposes.

Environment

DX NetOps Performance Management integrated with Virtual Network Assurance (VNA), all currently supported releases

Resolution

To automate the custom attribute creation, you would have to create a script that would use curl to create the attributes using the REST API calls defined in:

TechDocs : DX NetOps CAPM 25.4 : Manage Custom Attributes

 

You would have to create the attributes and apply them to the Tunnel or Component item type.

Then you would need your script to query the Data Aggregator to get a list of tunnels. You can filter for items that do not yet have the custom attributes populated.

  • Endpoint: GET http://<DA_HOSTNAME>:8581/rest/components (or the specific endpoint for your tunnel metric family).

  • Action: Parse the returned XML/JSON to extract the ID and ItemName (e.g., My-Company-Limited_XX-MySite--INET).

 

Within your script, you'd need to use Regular Expressions or string splitting to extract the desired values from the ItemName:

  • Map "My-Company-Limited" -> customer_name: My_Company

  • Map "XX" -> customer_code: 123

  • Map "INET" -> tunnel_type: Primary

 

After that, you would get the script to Send a PUT request back to the Data Aggregator to update the specific tunnel component with the new custom attributes. For example:

  • Endpoint: PUT http://<DA_HOSTNAME>:8581/rest/components/<TUNNEL_ITEM_ID>

  • Payload Example (XML):

    <Component version="1.0.0">
    <ID>123456</ID>
    <CustomAttributes>
       <customer_name>My_Company</customer_name>
       <customer_code>123</customer_code>
       <tunnel_type>Primary</tunnel_type>
    </CustomAttributes>
    </Component>

By running this script as a cron job (e.g., every hour), any newly discovered tunnels will be automatically tagged shortly after VNA brings them into the system.