We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

I'm creating event rule, facing issues on to map the node field

Ashfaq Naina A
Tera Expert

Hi 

I'm trying to create a event rule, In the event I can see the node name in additional information field I want to take the data and put it to Node field, when I drag the data in regex its woring with only one node because when I drag select its hardcoded, I want to use the regex code the get the data but not able to identify where to update the code to get the data.

3 REPLIES 3

BharatC
Mega Guru

Hello @Ashfaq Naina A 

 

Regex to use: Host=([^,]+)

 

Follow these steps:

 

1) Go to Event Rule → Field Mapping
2) Set: 1) Source Field: additional_info
2) Target Field: node
3) Enable "Use Regex"
4) In Regex:
1)Enter: Host=([^,]+)
2) Set Group = 1

 

Please click helpful if it helps you 

Regards

Hello @BharatC 

Where to set the source and target field I can't see any options. Please help..

amit_bt
Tera Expert

To extract the node name dynamically from the Additional Information field (which is a JSON blob) and map it to the Node field, you should avoid the "drag and select" method and instead use the Event Rule Transform tab with a manual Regex configuration.

Make a new field (e.g node1) with regex and place that in node field (i.e $node1) in event rule. Node field can be seen under event input (Right Side panel)