christopher.harris

How to change the hostname on an alert?

Discussion created by christopher.harris on Jul 30, 2009
Latest reply on Aug 1, 2009 by christopher.harris
I have my emailgtw configured so that the hostname is included in the subject of the email. Generally this works well, but for probes like url_response and net_connect the hostname is the same for all alerts and loses its value.

I'm trying to write a script which will modify the hostname on an alert when it is received by the NAS but so far it's not working. (example below) Can someone tell me if this is in fact possible, and if so what I'm doing wrong?

Script:

a = alarm.get()
printf ("a.hostname: "..a.hostname)
if a ~=nil then
   a.hostname = "test"
   alarm.set()
end

Outcomes