This section describes the procedure of creating an Enrichment stream.

Note: You will not have any default enrichment streams available in the UI. The Data Enrichments window will look like the following image without any default enrichment streams. You must create it.

DefaultEnrichmentwithoutStartStop

Procedure

  1. Navigate to Administration > Configuration > Enrichment.
  2. Click Add.
    The browser navigates to the Add Enrichment page.
    Under the Description tab, enter the following parameters:
    1. Name: Required field. Configures the name of the Enrichment. Only letters, numbers, hyphens, and underscores are allowed.
    2. Description: Required field. Configures the description of the Enrichment. A double quote in the field will be escaped to a single quote.
    3. Data Type: Required field. Configures the data type of the VMware Telco Cloud Service Assurance record being enriched. Three types of records are supported. You can select only one record at a time.
      • VMware Telco Cloud Service Assurance Event
      • VMware Telco Cloud Service Assurance Metric
      • VMware Telco Cloud Service Assurance Topology
    Add Enrichment Description
  3. Click Next.
  4. Under Filter, select the Property, Expression, and enter the Value for the Enrichment definition. The listed key properties are based on the selected data type such as Metrics, Events, or Topology.
    • To add multiple filters within the same group, click Add Condition. The AND condition tag is used when you add filters within the same group.
    • To add multiple filters, click Add Group. The OR condition tag is used when you add filters from different groups.
    Note: While metrics and events Enrichment streams have filters, there is no filter available for the Topology stream. Under Description if you select the Data Type as Topology, the Filter tab disappears.
    EnrichmentFilter
  5. Click Next.
  6. Under Enrichment Definition tab, provide the following parameter details:
    EnrichmentDefinition
    1. In Enrichment Key, there are two fields to be configured:
      • Key Property: Required field. Configures the key using the properties in the internal data model, which is used to match the corresponding external reference data key. The listed key properties are based on the selected data type such as Metrics, Events, or Topology. You can select multiple key properties.
      • Tag Name: Required field. Provide a tag name for the Enrichment definition. You can add multiple tag names.
    2. In Reference Data, there are two fields to be configured:
      • Reference Data File: Required field. Select the reference data file in CSV format. The file must have .csv as the file extension. The Enrichment uses the external reference data from the .csv file to enrich the VMware Telco Cloud Service Assurance records. Only letters, numbers, hyphens, underscores, and periods are allowed in the Reference Data File. The reference data file size should not be more than 10 MB.
      • You can also upload reference data .csv file using an external API by executing the following command.
        sh refdata_upload_api.sh <tcsa_url> <username> <password> <definition_json_file_location> <reference_csv_file_location>

        The following is the refdata_upload_api.sh file content.

        #!/bin/bash if [[ "$OSTYPE" == "darwin"* ]]; then export SED="sed" else export SED="sed -i" fi export URL=$1 export USERNAME=$2 export PASSWORD=$3 enrichmentDefinationJson=$4 referancefile=$5 export ACCESS_TOKEN=$(curl -k --location --request POST $URL'/auth/realms/NGINX/protocol/openid-connect/token' --header 'Accept: application/json' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'grant_type=password' --data-urlencode 'client_id=operation-ui' --data-urlencode "username=$USERNAME" --data-urlencode "password=$PASSWORD" | jq -r .access_token) sleep 2 curl -k -s --show-error --stderr -H "Content-Type: multipart/form-data" -H "tenant: Default" -X PUT -F "refDataConfig=@$enrichmentDefinationJson;type=application/json" -F "refDataFile=@$referancefile" $URL/enrichment/v2/reference-data -H "Authorization: Bearer $ACCESS_TOKEN"|jq .

        The following is the definition_json_file file content.

        { "enrichmentDefinitionName": "simple", "enrichmentName": "enricher-0", "csvDelimiter": "semicolon" }
      • CSV Delimiter: Required field. Select the delimiter type from the drop-down list. The default is comma.
        Note:
        • By default, the maximum file size is 10 MB, the admin can update the environment variable MAX_REFERENCE_DATA_SIZE and MAX_TOTAL_REFERENCE_DATA_SIZE of the Enrichment service to change the maximum file size.
        The following table lists the supported Wild Card (regular expression) patterns for key properties in CSV reference data file.
        Patterns Description
        %text% Multiple character match: this is similar to checking any key that contains particular text. For example: %DIR%, any key that contains DIR is matched.
        text1_text2 Single character match: this is to check if any matching single character is present between text1 and text2. For example, Router-DI_, here matching key is Router-DIF or Router-DIZ or Router-DI2, any key which starts with Router-DI and ends with any single charcter after DI is matched.
        <NI-N2> Specify a range: this is to specify any number range. For example, 172.<16-31>.<0-255>.<0-255>. Here matching key is 172.18.220.176 and unmatching key is 172.14.255.224.
        Note: N1 must be less than N2.
        | (pipe) Pipe: this is to specify multiple matching fields within a key.

        For example: IP*-172.<16-31>.*|IP*-192.168.*|IP*-10.*|172.<16-31>.<0-255>.<0-255>|192.168.<0-255>.<0-255>|10.<0-255>.<0-255>.<0-255>,india

        The example record has two fields, the first field is the datasource, and the second field is the location. In the following sample records, the key can be any of the following datasources.
        • IPv6-172.16.1.1
        • IPv4-192.168.1.2
        • IPv6-10.1.2.3
        • 172.17.91.11
        • 192.168.22.11
        • 33.22.11.3
        * (include all) For example: Router*DCP.
      To configure multiple Enrichments, click Add Enrichment Definition Setand fill the required data.
      Note: The order of enrichment streams is preserved. You can add multiple enrichments in the required order.
      While adding the second enrichment definition set, the Tag Name mentioned in the first enrichment set has to be mentioned in the Key Property field of the second enrichment set.

      The following image illustrates adding enrichment definition set.

  7. Click Save & Close to save the current Enrichment configuration and exit the wizard or click Save & Run to save the current Enrichment configuration and start the Enrichment processing. After the Enrichment configuration is saved or canceled, the browser returns to the Enrichment list page.
    Note:
    • The Reference Data File and its details such as Enricher Name, Enrichment Key, and Reference Topic are visible in the Details section of the Enrichment only if you upload the reference data CSV file as mentioned in step 6.
    • You can download the Reference Data File by clicking the .csv file from the Details section.