New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Is it possible to read strings with the SNMP custom table sensor?

Votes:

0

Your Vote:

Up

Down

Hello,

I am attempting to read the ipNetToMediaTable (1.3.6.1.2.1.4.22) on a switch, but it looks like the sensor cannot read the entire table, since it contains a column for MAC addresses and IP addresses that are listed as a string.

I was wondering if it is possible to read strings with the SNMP custom table sensor. Eventually, I want to be able to see which device is connected to which port of the switch. Since this will also contain MAC/IP addresses, I do not think I can currently retrieve that information from the switch.

If it is not possible, are there any workarounds available?

snmp-custom-table string switch

Created on Mar 5, 2018 2:23:32 PM by  Freek (9) 1



5 Replies

Votes:

0

Your Vote:

Up

Down

Hi Freek,

I am afraid to tell you that the SNMP Custom Table Sensor, can only query numeric values - thus is not able to process strings. Please refer to the following article for more information (section "Downsides/Limitations"):

As an alternative, PRTG's "SNMP Custom String" sensor monitors strings returned by a specific OID using SNMP. It can check for keywords, if you want to set limits to the sensor channel value, you can also extract a numeric value contained in the string. Please find more information about this sensor here:


Kind regards,
Andreas Günther, Tech Support Team

Created on Mar 6, 2018 12:20:57 PM by  Andreas Günther [Paessler Support]

Last change on Mar 7, 2018 12:30:59 PM by  Andreas Günther [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hello Andreas,

Thank you for your answer, but the SNMP Custom String sensor also cannot be used to get a string from a table. I have tried it a few times, but it always results in a 223 error (No such instance). I am guessing that, because the value is in a table, it only works for single values and not on a column of a table.

Is it possible for PRTG to perform a SNMP walk in a table outside of the Custom SNMP table sensor? I have tried some OID's in the ipNetToMediaTable for individuel values/columns, and getting a single OID directly out of the table results in the 223 error.

Created on Mar 6, 2018 1:37:42 PM by  Freek (9) 1



Votes:

0

Your Vote:

Up

Down

Hi Freek,

Which exact OID did you use for the Custom String Sensor? It seems the index was missing.

Please use our SNMP Tester to drill this down further. Here are the steps:
1) Download and run SNMP Tester (https://www.paessler.com/tools/snmptester)
2) Specify your target device settings as you have in PRTG
3) Choose "Walk" for the OID "1.3.6.1.2.1.4.22"
4) Start the scan with "Start"

You should then be able to identify the exact OIDs, like in the following example:

----------------------- New Test -----------------------
01.03.2016 17:10:32 (34 ms) : Walk 1.3.6.1.2.1.31.1.1.1.1
01.03.2016 17:10:32 (46 ms) : 1.3.6.1.2.1.31.1.1.1.1.1 = "LAN Interface 0/1" [ASN_OCTET_STR]
01.03.2016 17:10:32 (59 ms) : 1.3.6.1.2.1.31.1.1.1.1.2 = "LAN Interface 0/2" [ASN_OCTET_STR]
01.03.2016 17:10:32 (72 ms) : 1.3.6.1.2.1.31.1.1.1.1.3 = "LAN Interface 0/3" [ASN_OCTET_STR]
01.03.2016 17:10:32 (84 ms) : 1.3.6.1.2.1.31.1.1.1.1.4 = "LAN Interface 0/4" [ASN_OCTET_STR]

Kind regards,
Andreas Günther, Tech Support Team

Created on Mar 7, 2018 1:02:18 PM by  Andreas Günther [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hello,

Looks like you were right about the index missing. I first attempted to read 1.3.6.1.2.1.4.22.1.2, but I was simply missing the last part of the OID. It is actually 1.3.6.1.2.1.4.22.1.2.63.X.X.X.X with every X replacing part of the IP address of the device. That was probably the index you talked about.

I got a MAC address from the ipNetToMediaTable table, however I am still stuck with the problem that the Custom SNMP table sensor cannot handle strings.

I also saw that the SNMP custom table sensor creates a seperate sensor per row according to the manual:

This creates a lot of sensors if I want to read tables from devices. I think it is best to not use that sensor at all and look for a different way to read tables from a device via SNMP.

Created on Mar 8, 2018 8:04:43 AM by  Freek (9) 1

Last change on Mar 9, 2018 8:35:45 AM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hello Freek,
thank you for your reply.

I got a MAC address from the ipNetToMediaTable table, however I am still stuck with the problem that the Custom SNMP table sensor cannot handle strings.

Yes, as mentioned earlier, you won't be able to use the SNMP Custom Table. You will need to locate the OID's (for example with the walk) and then use the SNMP Custom String sensor for each OID.

I also saw that the SNMP custom table sensor creates a seperate sensor per row according to the manual. This creates a lot of sensors if I want to read tables from devices. I think it is best to not use that sensor at all and look for a different way to read tables from a device via SNMP.

Yes, with the Table sensor you will need one sensor per table entry. However, with theSNMP Custom String sensor you will also require one sensor per OID (and it can actually read the string).

Also, please note that each sensor can only have one message, so there's no way around this.

Best Regards,
Luciano Lingnau [Paessler Support]

Created on Mar 9, 2018 1:58:54 PM by  Luciano Lingnau [Paessler Support]

Last change on Mar 9, 2018 1:59:25 PM by  Luciano Lingnau [Paessler Support]



Please log in or register to enter your reply.


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.