Cheers Rowan, current script below. We would like to run a separate script against all Robots, only on one HUB.
-- Start of script
local al = alarm.list() -- Get alarm list
local re = "%p%a+%d*_*%a*%d*%p" -- Regex to match probe name with alpha, numbers and underscore
if al ~= null then
for i = 1,#al do
if al[i].prid == "controller" then -- First, filter to get alarms from controller probe only
if string.match(al[i].message,"FAILED to start") then -- Second, filter to get controller alarms with specific text i-e "FAILED to start"
probe = string.gsub(string.match(al[i].message,re),"'","") -- Get probe name from alarm message and then remove quotes from probe name to use in probe_verify callback
--print(al[i].message.."! Probe-> "..probe) -- View alarms with probe names which failed to start
addr = "/"..al[i].domain.."/"..al[i].hub.."/"..al[i].robot.."/".."controller" -- Build Nimsoft address
printf("/"..al[i].domain.."/"..al[i].hub.."/"..al[i].robot.."/".."controller".."<->Probe="..al[i].prid) -- Print Nimsoft address(es)
-- Now run the probe_verify callbacks on each probe which FAILED to start
local args = pds.create()
pds.putString(args,"name",probe)
nimbus.request(addr,"probe_verify",args)
nimbus.request(addr,"probe_activate",args)
pds.delete(args)
sleep (100) -- A little delay between each probe callback
end
end
end
end
-- End of script