Hi all,
I’m trying to poll a table from a Qaction and cannot seem to get the keys correctly. I’m using the standard SNMPPolling namespace with a few modifications.
The table in question has an instance is comprised of keys from 3 separate OID ranges/tables:
Here is my oid setup:
^you use the first OID twice in order to store the instance. I have tried this with both .4.2.1.1 and .4.2.1.2
And here is the code I use to get the keys:
I’ve tried this with both the one instance OID (commented out) and all 3 instance OIDs. With all 3, running the code above, I’m able to get the first instance (1.1.1) from all of them, but it throws an error when trying to convert to an object array:
I'm less interested in the invalidcastexecption (that can be fixed later) and more wondering why I can't seem to get the instances. If I use any of the other methods (:table, :tablev2, :instance), it results in a blank/null value:
Has anyone ever encountered this/know what to do? I'm able to walk through the table on a MIB browser.
Thanks in advance!
Hi Alex,
My experience with SNMP keys is that these usually are not pollable OIDs, but rather a definition of how to interpret the instance part of an OID for any of the other columns. If this were a table being set up in a driver, I'd add a column of type instance to collect the instance from the received values, without defining a column that matches the instance OID(s).
I don't know from the top of my head how this could be achieved using the notify calls, so I'd like to know if you walk through the table using the QA SNMP Simulation Creator, does it actually receive values for those instance columns?
I’m trying to find some more information about the NT_SNMP_GET call, that I was convinced was available, but no luck so far.
I vaguely remember that polling a table would be done by providing the column OIDs in a comma-separated list, and use the :table or :tablev2 method at the end.
Not sure how the :instance method behaves, and if that might solve our problem here.
So far, it seems like my memory has served me wrong, haven’t quite found the explanation for the tablev2/table/instance methods, but at least :tablev2 on a single column (but multiple columns can be added to the oid object array), results in an object array of instances, and an object array of column values.
So in that case, you don’t need to retrieve the key or instance column, and can fetch all columns in a single notify.
Okay, I’ve found a few more examples in drivers part of our regression tests.
“tablev2” will perform an SNMPv2 getBulkRequest. It’s possible to poll multiple columns by concatenating their OIDs with semicolons. e.g. “colOID1;colOID2;colOID3:tablev2”, where the response will contain an object array for the instances too.
“table” seems to use get-next-request, I haven’t gotten it to work for a semicolon list of OIDs yet, which I expected to work too. We’ll try to look into this notifyprotocol and work on updating the documentation with the Acquisition team tomorrow.
With the help from Pedro, we found additional documentation about the get request under the multithreaded timers topic.
https://docs.dataminer.services/develop/devguide/Connector/AdvancedMultithreadedTimersSnmp.html
The page contains a few extra pieces of information that can help with the notify (https://docs.dataminer.services/develop/api/NotifyTypes/NT_SNMP_GET.html)
We’ll try to consolidate and extend the documentation regarding the NT_SNMP_GET in the near future.
Hi Floris,
Thanks for the feedback. It’s indeed not a pollable OID, so the sim/MIB browser won’t show it, but would rather show .. The instance is typically .. where each OID comes from a different OID range/table.