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?


Article Comments

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


Mar, 2018 - Permalink

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.


Mar, 2018 - Permalink

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


Mar, 2018 - Permalink

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.


Mar, 2018 - Permalink

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]


Mar, 2018 - Permalink

As I understand it he needs something similar to the tables presented in the netflow sensor. Would this be possible today?


Oct, 2020 - Permalink

Hi there,

I'm afraid there had been no changes for the SNMP Custom String Sensor in this regard.


Kind regards,
Andreas Günther
Tech Support, Paessler AG

support@paessler.com


Oct, 2020 - Permalink

Any news in 2021 regarding string support within the "snmp custom table" sensor???

We have a lot of tables where the first column is an ip-address and the following columns are numbers


Apr, 2021 - Permalink

Hi there,

we have no new Sensor regarding this. I would recommend to take a closer look at the response from Luicano in this post. You can also check our roadmap to see which features will be released in the next time: https://www.paessler.com/prtg/roadmap


Apr, 2021 - Permalink

Any news in 2022 on this feature? (regarding string support within "snmp custom table" sensors) Even can't find it on the PRTG Roadmap.


Aug, 2022 - Permalink

Hi there,

I'm afraid that this feature is not planned on our side as strings can be monitored already with the SNMP Custom String sensor as mentioned by my colleague above.

Regards.


Aug, 2022 - Permalink