how can one use a probe request to query the interface_traffic probe and receive back the system description?
we tried using a 'get_system_info' but we are obviously not filling in the proper fields to get an answer from the probe.
here are the fields:
<get system info>
if the host we are querying is apollo, the community is public, and the snmp version is 1. what else needs to be filled in for us to get back the entire system description?
I think you have to supply the snmp prot number also.
Are you trying to extract sysDescr (overall device description) or ifDesc (description of the given interface)?
The end goal is to run a probe request and put the output into a dashboard.
This probe request would query the sys.descr OID and would output the entire string including IOS version, make model and anything else in that the OID returns into a line or lines of text in a dashboard.
(Thanks to Keith) I got this working via the Cisco_Monitor Probe.
Keith and I are onsite at CPS right now and they have a similar request - let me walk you through this using Apollo's Cisco_Monitor Probe.
CTRL+P on Cisco_Monitor
Probe Commandset: query_agent
There you have it... You can supply it with any OID.
The other caveat to this is that the device/host being queried must be a defined agent in the Cisco_monitor probe as the call back uses the SNMP information in the profile to run the query.
I think you can use the snmpget probe callback query_agent because you can specifiy the snmp connection values needed. The command is query_agent
the needed arguments are;
To get the same information as was noted using the cisco_monitor probe the argument values are:
host = 188.8.131.52
community = skrivles
version = 1
port = 161
oid = .0 (note the dot in front)
root = .184.108.40.206.220.127.116.11 (again note the dot in front)
I ran this in the snmpget probe utility and got back the pds structure I expected;
Probe : /Nimsoft-Demo/WorldWideHQ/apollo/snmpgetAddress: 192.168.128.10Command: query_agent
numoids 1 integer 2 done 1 integer 2 oids <TABLE START> PPDS 600 0 - PDS 591 oid .18.104.22.168.22.214.171.124.0
string 19 ucd system.sysDescr.0 string 18 value "Cisco IOS Software, C1700 Software (C1710-K9O3SY-M), Version 12.4(7), RELEASE SOFTWARE (fc6)Technical Support: http://www.cisco.com/techsupportCopyright (c) 1986-2006 by Cisco Systems, Inc.Compiled Wed 01-Mar-06 string 238 variable Cisco IOS Software, C1700 Software (C1710-K9O3SY-M), Version 12.4(7), RELEASE SOFTWARE (fc6)Technical Support: http://www.cisco.com/techsupportCopyright (c) 1986-2006 by Cisco Systems, Inc.Compiled Wed 01-Mar-06 0string 236 itype 4 integer 2 type OCTET STRING string 13 lastoid .126.96.36.199.188.8.131.52.0 string 19
So in your probe request the final part that has what you want is "value".
With the help of Keith I was able to get a LUA script that could pull the IOS version information from cisco_monitor. Now, I'd like to scale this so it can run through all of the profiles in Cisco_Monitor and dump them into a custom table on the NIS. Much like Javier I would like to create a table on a dashboard with this information. With Jim's help yesterday I was able to create an AO based script that ran off of snmpget, but I realized it just wouldn't scale well enough. Below is the code I currently have for one device on my local NMS installation, could someone please point me in the right direction to run through all the profiles in the Cisco_Monitor probe. I'm currently just printing the value for testing, as mentioned before I will be dumping it into a custom table at the end.
local args = pds.create()
cisco_host_addr = "192.168.1.252"
pds.putString(args, "host", cisco_host_addr)
pds.putString(args, "oid", ".184.108.40.206.220.127.116.11.0")
cisco_monitor_addr = "/Enterprise/windows2008/windows2008/cisco_monitor"
local result, rc = nimbus.request(cisco_monitor_addr, "query_agent", args)
if rc == 0 then
ios_version = split (result.oids["0"].value, ",")
print("Request failed with error code: " ..rc)
Just a quick note here...
You will need to issue a nimbus.request to the controller probe where the cisco_monitor probe is deployed. The command is probe_config_get. the arguments needed are name = cisco_monitor. I belive that robot (the robot name) is optional. The var argument is optional and you won't need it as you want to get the entire config entries. You will then need to parse thru to get the profile IP addresses.
I have run a couple of tests against the interface_traffic probe on apollo. All you should need to supply are;
hostname - as defined in the probe. this is the IP address of the device
community - as defined in probe
detail should be optional and default to 0, your options are 0 or 1
port - as defined in probe, normally 161
version - again as defined in probe. It is a single digit 1, 2, or 3
I can use these with the addition of id = the id number of the interface I want the info from successfully. However, I consistently get a "temporarily out of resources" error whenever I run the get_system_info command. I have tried with the Probe Utility GUI and using the pu.exe directly on apollo. this leads me to believe that the problem lies with the get_system_info call back command itself and should be reported as a bug.
I am not involved with this probe, but I was just curious about the temporarily out of resource code you received so I took a quick look.
interface_traffic probe will spawn a background thread to do the snmp query for you and return a NIME_AGAIN (temporarily out of resource status code). The GUI understands this and will keep the session alive and re-query on the same session and get the results when the interface traffic probe is done.
This is a probe technique we use between guis and probes sometimes when we want to perform tasks in the background to prevent hanging the GUI's or interfering with normal workflow of probes.
Unfortunately, neither the pu.exe command utility or the VB pu gui you can get by hitting CTRL+P on the probe support async calls.
I don't know if the dashboards can do this either. But maybe you can get this done by passing your request through dap probe and pick out your information from there. But I don't know how dap and dashboards work and what you can do with them.
Thanks for the insight Geir. I'm not sure how we could route this through dap as it is basically configured to access databases with JDBC drivers - at least as far as I know.
I don't know dap too well. I know it can do probe requests, but I am not sure how to pass arguments to it or how it can handle complex data, or what the data returned by interface traffic returns.