Control what columns needs to be sent in alert node

I have the following tickscript which is alerting on Used Memory Percent, it is working correctly.
But it is sending and storing all the columns from m1 and m2, is there a way i can control what column i need to send in alert node.

var window_size = 10s
var period_size = 20s
var mb = 1000 * 1000
var critical_threshold = 10

// Stream m1
var m1 = stream
|from()
.measurement(‘mem’)
.groupBy(‘host’)
|window()
.period(window_size)
.every(window_size)
.align()
|last(‘total’)
.as(‘total’)
|log()

// Stream m2
var m2 = stream
|from()
.measurement(‘Memory’)
.groupBy(‘host’)
|window()
.period(period_size)
.every(window_size)
.align()
|last(‘Available_MBytes’)
.as(‘Available_MBytes’)
|log()

// Join m1 and m2
var data = m1
|join(m2)
.as(‘m1’, ‘m2’)
.tolerance(5s)
.fill(‘null’)
|eval(lambda: “m1.total” / mb,
lambda: float(“m2.Available_MBytes”) / float(“total_mbytes”) * 100.00)
.as(‘total_mbytes’, ‘used_mem_perc’)
.keep()
|log()

//var get_percentage = data
//|eval(lambda: (“m2.Available_MBytes” / “total_mbytes”) * 100)
//.as(‘used_mem_perc’)
//.keep()
//|log()

// Compare the joined stream and alert when m1 and m2 values are different
data
|alert()
.crit(lambda: “used_mem_perc” >= critical_threshold)
.message(‘Used_Percentage is HIGH {{ index .Fields “used_mem_perc”}} total_mbytes = {{ index .Fields “total_mbytes” }} Available_MBytes = {{ index .Fields “m2.Available_MBytes” }}’)
.details(‘NA’)
.data(’’)
.log(‘C:/temp/Kapacitor_Alerts/Script1.log’)

Hi @Ashish_Sikarwar ,

the deletenode is your friend :wink:

Thank You Marc. I will give it a try.