This article gives insights about Topology Match Tokens in Watson AIOps.
The detailed documentation about defining merge rules is available in IBM documentation https://www.ibm.com/docs/en/cloud-paks/cloud-pak-watson-aiops/3.4.2?topic=elements-configuring-rules
1. Create Match Token
- Create match token with the below condition.
- Tokens :
name
- Resource Types :
deployment
- Merge Token Created
2. View Resource Details
The merge token is created. Let us review the Resource details with the merge token.
-
Right click on the ilender-user
deployment resource and click on the Resource details
menu.
-
Here is the resource details of the ilender-user
deployment.
You can see the properties like _id
, resourcetype
and etc.
Click on the Show Json
option button.
- The json view of the
ilender-user
deployment resource properties is displayed.
The json file is available here.
You can see the properties like _id
, resourcetype
and etc.
You can also note that the matchTokens
property contains the values of
- unique id :
f35675ff-be21-4851-a892-3cd1a5f7721b
- deployment resource name :
ilender-user
"matchTokens": [
"f35675ff-be21-4851-a892-3cd1a5f7721b",
"ilender-user"
],
3. Pushing Events with Match Token
Lets push an event to kafka topic using match token and see in Alert Viewer.
-
Create Kafka topic like this
-
Create Event file like the below. Sample file is available here
The ilender-user
value from this "application":"ilender-user"
property would be taken and matched with fields _id
and matchTokens
.
- Push the events to kafka.
Refer this article https://github.com/GandhiCloudLab/ibm-watson-aiops/tree/main/09-push-events-to-kafka-topic.
-
The pushed event is super embossed on the topology as an alert like the below.
-
There is an alert created in the Alert Viewer
.
4. Pushing Events with _id
By default, _id
field is used to map the event to topology resource. When the resources are recreated, then this _id
would change, so event also to be modified. To overcome this probelm only the match token concept is available.
Lets see how _id
field is used here.
- Create Event file like the below. Sample file is available here
The f35675ff-be21-4851-a892-3cd1a5f7721b
value from this "application":"f35675ff-be21-4851-a892-3cd1a5f7721b"
property would be taken and matched with field _id
in the topology resources.
-
Push the events to kafka.
-
There is an alert created in the Alert Viewer
.