Is it possible to bulk manage/ unmanage monitoring profile for probes (snmpget, interface_traffic, rsp) via command line or thru api?
You can use the probe_config_set callback on the robot/controller to update probe configs. This would allow you make changes from any of the API languages or even the PU command line utility. The controller whitepaper outlines the arguments.
Could you please clarify what you mean by "Manage/Unmanage"? We use the term "Managed" primarily in conjunction with Discovery and the NiS Manager. Discovered devices have a state that can be set to Managed, Ignore, Maintenance - no state having been set would constitute Unmanaged. Probe profiles are either active or not active (deactivated). Is your question about setting the state of devices in the NiS or about activating/deactivating probe profiles?
Not sure if this is along the same lines as what Gyan is asking, but here's a scenario. If I have multiple profiles in the url_response probe cfg and wanted to make a bulk change, let's say set each profile to retry the url 4 times instead of 3, how would we set that up using an API call? I know we can use probe_config_set callback from the robot to tell the url_response probe to change EACH profile, but how can you do that in just ONE call where it changes every profile in a bulk fashion? Hope that makes sense.
The script would need to know the list of profile names. It could use the probe_config_get callback to get that, of course.
As an example, disabling all profiles in url_response (after getting the list of profiles) would look something like this:
local settings = pds.create()
for x,profile_name in ipairs(profile_list) do
pds.putString(settings, "/profiles/"..profile_name.."/active", "no")
local args = pds.create()
pds.putString(args, "name", "url_response")
pds.putPDS(args, "as_pds", settings)
local resp,rc = nimbus.request("controller", "probe_config_set", args)
if rc == NIME_OK then
print("Failed. rc = "..rc)
You can set a single config settings by using simple string argments to probe_config_set, but the PDS option is very powerful for setting multiple settings.
This for probe profiles (ativate / deactivate).
Suppose we have configured around 100 profiles on interface_traffic probe, and for each profile there might be multiple interfaces.
We need an option to activate/ deactive:
a) the profile itself
b) an interface under a particular profile
You would most likely have to poll the device via the probe_config_get or a direct call into the device and get the interface index_id as I believe that references the interface number in the CFG file.
From Apollo interface_traffic
agent = 192.168.128.254
active = yes
community = 2fk7En95cb2xQ1AWT5zIpg==
interval = 30min
group = Campbell
number = 8
expint = 0
flags = 0
ident = 17
description = nim-rwc-asa5510,
use_ifname = no
name = Adaptive Security Appliance 'Virtual254' interface
active = no
type = other
services = 895
checksum = DD5E2B25B4FD3BD13441C8D69086E43B
I have attached a screenshot of the probe_config_get. As you can see the interface index, in this case 8 matches the probe config section of interfaces/Cisco Firewall/8. I would think this would allow to programatically make changes as long as you knew the interface indexid either beforehand or as part of the update.
Thanks everyone for the quick response.
Retrieving data ...