chris_amaya

Problem with restating a Service from Lua Script

Discussion created by chris_amaya on Feb 23, 2012
Latest reply on Feb 24, 2012 by ntimm

Hi!!!

 

I have a little problem with a LUA script. So i'm going to explain myself a little:

 

I want to to restart a service from the probe ntservices, when some alarms has count two times, in some interval of time, I already do that on the nas probe with the autooperator but the script is not doing what most do.

 

I copy the script, I don't know if it is ok, but not problem appers when I click on the Validate and Exute script button.

 

addr = "/Agrega/SIH/si-s1/ntservices"

-- Create variable for Windows Service name
argsa = pds.create()
pds.putString (argsa,"name","ActiveXperts SMS Messaging Server")

-- Stop Windows Service
s_statusa,rca = nimbus.request(addr,"stop_service",argsa)

--Start Windows Service

s_statusa,rca = nimbus.request(addr,"start_service",argsa)

 

Any ideas???

 

THANKS!!!!!!!!!!!!!!!

Outcomes