Hi all,
I'm looking for a way to rebuild an alarm after I've stripped out the ampersands from the alert text.
I need to strip out the Ampersands so it can be passed to an XML document which then feeds into our ticketing system.
Here's the code I have so far (which is working) but the alert that gets generated appears as if it's come from the NAS and our primary UIM Server.
All the other details come through on the new alarm perfectly!
a = alarm.get ()
message = a.message
message1 = string.gsub(message, "%&","&") -- change string parts
if a ~=nil
then
nimbus.alarm (1, message1, a.supp_key,a.hostname, a.source, a.origin, a.hub, a.user_tag2, a.prid)
end
Also, when I "print" the output it comes out correctly, but when it sends it as an alarm it appears to override the probe and Robot
I've read through this script but I'm not sure on how I can intergrate it into what I'm looking for:
Any help would be greatly appreciated
Cheers,