Updating the Topology Rules to correlate UMA clusters and SNOW CIs
search cancel

Updating the Topology Rules to correlate UMA clusters and SNOW CIs

book

Article ID: 437877

calendar_today

Updated On:

Products

DX Operational Observability DX SaaS

Issue/Introduction

We have openshift clusters and two sources : one is APM UMA and second is a custom data ingested from SNOW, at the moment the CI appears as separate entities.

What are the steps required to update the topology compaction rules to correlate the CIs together ?

Bellow a summary example of the data structure from both sources: APM UMA and SNOW

{
    "vertices": [
        {
            "id": 12345,
            "externalId": "INFRASTRUCTURE:k8s_CLUSTER:testlab",
            "attributes": {
                ...
                "SourceProduct": [
                    "APM"
                ],
                "agent": [
                    "testlab|ClusterPerformanceMonitor|Prometheus Agent",
                    "testlab|ClusterDeployment|Infrastructure Agent"
                ],
                "k8s_agent_data_source": "apmia",
                "k8s_cluster_name": "testlab",
               ...
                "name": "testlab",
                ...
                "type": "k8s_CLUSTER"
            },
            ...

{
    "vertices": [
        {
            "id": 234556,
            "externalId": "CUSTOM:####-####-#####-####-#########",
            "attributes": {
                ...
                "SourceProduct": [
                    "SNOW"
                ],
                ...
     
                "name": "testlab",
                ...
                "type": "HOST",
                ...

Environment

DX O2

Resolution

Step 1: Exact  the existing Topology compaction rules using the get Correlation Information API

https://<APM_Gateway_Route>/oi/v2/oipublic/topologyprocessor/correlation

IMPORTANT: Backup the original rules

 

Step 2: Update the existing rule: identify a new common attribute to both sources, in this example "dx_k8_name_key"

Explanation of below new rule:

a) for APM, create a new attribute " dx_k8_name_key" for CIs that has "type": "k8s_CLUSTER" or  "k8s_NAMESPACE" and set the value in the attribute "name"

b) for SNOW, create a new attribute " dx_k8_name_key" for CIs that has "type": "HOST" and set the value in the attribute "name"

c) Add the new attribute to the correlationAttributes section

 

{
  "attributeMappingRules": [
    {
      "products": [
        "APM"
      ],
      "attributeValueMapRules": null,
      "rules": [
       ..
        {
          "toAttrName": [
            "dx_k8_name_key"
          ],
          "toValueType": "scalar",
          "useFirstValue": false,
          "conditionalRules": [
            {
              "orderPosition": "100",
              "condition": {
                "$OR": [
                  {
                    "attrName": "type",
                    "attrValue": "k8s_NAMESPACE",
                    "ignoreCase": true,
                    "isRegex": false
                  },
                  {
                    "attrName": "type",
                    "attrValue": "k8s_CLUSTER",
                    "ignoreCase": true,
                    "isRegex": false
                  }
                ]
              },
              "fromAttrNames": [
                "name"
              ]
            }
          ],
          "override": "true"
        },

...

    {
      "products": [
        "SNOW"
      ],
      "attributeValueMapRules": null,
      "rules": [
        {
          "toAttrName": [
            "dx_k8_name_key"
          ],
          "toValueType": "scalar",
          "useFirstValue": false,
          "conditionalRules": [
            {
              "orderPosition": "100",
              "condition": {
                "$OR": [
                  {
                    "attrName": "type",
                    "attrValue": "HOST",
                    "ignoreCase": true,
                    "isRegex": false
                  }
                ]
              },
              "fromAttrNames": [
                "name"
              ]
            }
          ],
          "override": "true"
        }
      ]
    }
  ],
  "correlationAttributes": [
    "dx_ip_address_list",
    "dx_ip_address",
    "dx_mac_address",
    "acn_loganalytics_key",
    "dx_k8_name_key"
  ]
}

Step 3. Perform a validation of the new rule using the dry-Run Correlation Rules API:

https://<APM_Gateway_Route>/oi/oipublic/topologyprocessor/correlation/rules/dryrun

 

Step 4. Persist the change using the update Correlation Rules API

https://<APM_Gateway_Route>/oi/oipublic/topologyprocessor/correlation/rules/update

Additional Information

Techdocs DX O2 OnPrem Topology Processor APIs