Hi Roberth,
I have not tested this code but you need to play around and modify as per your requirement, this is just an example you can use to start with. this code is written in LUA, code provided by Rowan is also a lua code.
You can get the required values from the message or probe or subsystem type etc and then on basis of matching criteria, you can populate values to the custom tag.
smessage = string.upper(event.message)
sprid= string.upper (event.prid)
stype = string.upper(event.sid)
if stype == "NMS" then
if (string.find(smessage, string.upper("whatever message text you want to match"))) ~= nil then
event.custom_5 = "your text1"
return event
end
end
if (sprid == "SQLSERVER") then
if (string.find(smessage, string.upper("whatever message to match"))) ~= nil then
event.custom_5 = "your text2"
return event
elseif (string.find(smessage, string.upper(" - match condition 1")) and string.find(smessage , string.upper("match condition 2"))) then
event.custom_5 = "your text3"
return event
end
end
Note: this code is not tested, should be tested in test environment first.