rkalidh87

probe_config_get

Discussion created by rkalidh87 on Feb 13, 2018
Latest reply on Feb 16, 2018 by Garin

Hi,

 

Am trying to retrieve active sql profiles via Controller call back (probe_config_get) in LUA.

 

I need to iterate only /profiles and print the active profile name. have no idea on how to iterate probe_config_get .

 

please help me.

 

local robot,rc= nimbus.request("/Domain/HUB","getrobots")
args = pds.create()
pds.putString(args,"name","sqlserver")
if (rc==0) then
for i, j in pairs(robot.robotlist) do
temp=j.addr
if robot ~= nil then
for k,l in pairs(robot) do
probes=nimbus.request(temp.."/controller","probe_list")
if probes ~= nil then
for p_key,p_value in pairs(probes) do
if p_key == "sqlserver" then
if p_value.active == 1 then
sql=nimbus.request(temp.."/controller", "probe_config_get", args)

Outcomes