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",
...
DX O2
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