Within a protocol I want to detect when an SNMP table result is an empty array.
When this condition is discovered I will use QAction to update a standalone parameter to alert of the null data response from the array.
When the parameter is receiving data, I'll update the other parameter again
What's the best way to detect a returned empty snmp arrays in a protocol?
As this question has now been open for a long time and there has been no further reaction from you, I will now close it. If you still want more information about this, could you post a new question?
Hi,
By executing a count on the number of rows in the table it is possible to know if a table is empty or not.
int rowCount = protocol.RowCount(tablePid);
if rowCount == 0 then the response is empty, else it will have data.
Do note that this will only work if the device is responding. If there is a timeout then the previous polled rows will remain in the table.
Regards,
Thanks for the reply.
Unfortunately a snmp table response of zero does not mean the table will be empty so this example doesn’t work.
See example https://samstump.com/dma/snmptableresponse.png
You are correct the table rows stay in the table when a timeout occurs – which is fine – but when the timeout is resolved if the snmp table response is empty then the previous rows are still in the table and counting the number of rows does not work to highlight the empty snmp table response.
I have tried with an snmp simulation to poll a table with rows and then poll it again without the rows and in my case the rows are no longer present in the table on the element.
-Which DataMiner version is being used?
-Is it polling SNMPv1,v2, or v3?
-How does the table definition look like in the protocol.xml: is the table containing all columns of type “snmp” or does it also contain other column types like “retrieved” or “state”?
-How does the SNMP/OID tag look like for the table parameter? Is it having the options=”instance;multipleGetNext” or is it using a different method?
Hi Sam,
Have you been able to find a solution for this yet? If the answers below helped, could you select the most helpful answer, or if you found another solution altogether, could you let us know? If you still need help with this, could you answer the questions Laurens asks in the comment of January 19th?