NAS Script to Change Origin

Discussion created by nirmit_bali on Jan 12, 2015
Latest reply on Jan 12, 2015 by jonhcw

Hi All,


I was wondering to change the origin of robots to extend Dashboards to different Team's based on server owners group.

Eg. DB servers to be accessed by DBA Team, and application owners can access application specific servers.


We have more than 1000 servers, and manually adding origin field in controller probe of robot is a lot of effort.


I created a script from probe_config_set callback, to modify spooler config file and then restart both spooler and controller probe.

For testing we have not made the use of 'for' loop for looping in set of robots, to change the origin field.

But the script is not changing the origin.


args = pds.create ()

pds.putString (args,"name","spooler")

pds.putString (args,"section","/spooler")

pds.putString (args,"key","origin")

pds.putString (args,"value","DBA")

pds.putString (args,"robot","vhedtlycfe01")

local set = pds.create ()

pds.putString (set,"name","spooler")

pds.putPDS (set,"as_pds",args)

nimbus.request ("/PHEDTCASCL01dom/PHEDTCASCL01hub/vhedtlycfe01/controller","probe_config_set",set)

nimbus.request ("/PHEDTCASCL01dom/PHEDTCASCL01hub/vhedtlycfe01/spooler","_stop")

nimbus.request ("/PHEDTCASCL01dom/PHEDTCASCL01hub/vhedtlycfe01/controller","_stop")




As I am new to Lua scripting :smileysad:.. Any suggestions or correction in the script would be highly appreciated.



Nirmit Bali