I am facing problem to load Interface profiles into "interface_traffic" in process of Automation using perl API.
Please let me know call back listing interfaces corresponding to network device.
Abhishek Kumar Tiwari
I was not able to see what you are looking for which a a complete list of interface by host. Only call back I saw required a interface number which yes is possible to loop through but not ideal. I would think there would be a call back to just list all interfaces on a host. Maybe I missed it but if it's not there sounds like a good feature request.
If your script can reach the device with snmp you could do it direct from Perl to the snmp device.
Hi Neal / Robin,
The scenario at his end is such that he has already deployed the interface_traffic probe and using perl program to add network devices and associated interfaces to the interface_traffic probe configuration using "probe_config_set" callback of controller probe. While he was able to successfully add the network device, however in order to add the associated interfaces, he needs to first get a listing of the same. That's why he was looking for a callback which would allow him to list the interfaces corresponding to a network device.
Using "net-snmp" module or binary snmpget / snmpwalk in perl to list down all the interfaces for a network device is always an option. However the perl script may not reside on the host where interface_traffic probe is running or the network device might not be reachable through snmp to the host where perl script runs. As interface_traffic probe does this automatically through GUI, there must be a logic written in the probe configuration to list down interfaces associated with a network device. We will be lucky if that logic is exposed in form of a callback.
I checked the probe directory for interface_traffic probe and found that there are no external binaries like snmpget.exe or snmpwalk.exe that resides in the directory. Hence the logic for this must be within the probe itself.
Please help and suggest.
The logic is definitely exposed in a callback. There is no other way for the GUI to get the information from the probe other than with a callback.
I have some limited experience using a callback for something like this in the snmpget probe. I imagine there is a good chance the interface_traffic probe works similarly. From what I remember, there was no callback that let you query information using a profile already in the probe. You have to pass in all of the information needed by the SNMP request, including the community string. Because the devices were added by the Perl script, hopefully the script already knows the community string.
Thanks for the details. So which probe_callback should I use where I will supply all the inputs which are required for adding a network device and will get the details of the interfaces associated with it ?
I had a look at the interface_traffic probe callbacks and it seems there are two probe callbacks which might work over here namely "get_oper_state" and "get_route_table".
The callback was query_agent in the snmpget probe. I do not think the same callback exists in the interface_traffic probe.
As you have mentioned, there is no callback by the name "query_agent" in the interface_traffic probe. However I will check which one out of "get_oper_state" and "get_route_table" will work in this case and revert with the status.
Retrieving data ...