What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags

View all Tags

Count SNMP table rows or columns.



Is it possible to count the number of tables or rows in a SNMP table? I have a table which keeps track of missing objects. Whenever an object dissapears, a row is added to this table. This table is usually empty. I have noticed that I cannot add tables to the custom SNMP table sensor if the table is empty.

Is it possible to keep track of the number of entries (rows or columns) that are in such a table?

I will then be able to keep track of the number of objects missing.

custom-sensor empty-table snmp snmp-custom-table table-entries

Created on Mar 14, 2018 10:00:56 AM

Last change on Mar 14, 2018 12:03:37 PM by  Luciano Lingnau [Paessler]

2 Replies



Hello there Freek,
we appreciate your contact.

We did consider the creation of such sensor, but didn't really find a way to make this user-friendly, flexible and easy to implement, so we eventually gave up the idea.

But this does still not prevent you from doing it. PRTG allows you to use anything you can code as a custom sensor. For instance, please have a look at this script:

This essentially does just that. It walks a specific OID (One column from the table) and then counts the number of entries in the column based on the returned value. You could essentially simplify this script and it will allow you to count the total number of entries in the table.

A bit of extra code might be needed to handle the empty table, as this may produce an exception from NET-SNMP. But apart from that, it should be very simple.

If you never created powershell-based custom scripts, it might be worth having a look here as well:

Best Regards,
Luciano Lingnau [Paessler Support]

Created on Mar 14, 2018 12:03:25 PM by  Luciano Lingnau [Paessler]



@Freek, did you ever create such a script?

Thank you!

Created on Nov 11, 2019 5:48:25 PM

Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.