PRTG Manual: SNMP Custom String v2 Sensor
The SNMP Custom String v2 sensor monitors a string returned by a specific object identifier (OID) via the Simple Network Management Protocol (SNMP). The sensor interprets the SNMP value returned by the OID as a string, a MAC address, or an IPv4 address and shows the interpreted value in the sensor message.
For a detailed list and descriptions of the channels that this sensor can show, see section Channel List.
- Dutch: SNMP Custom String v2
- French: SNMP Custom String v2
- German: SNMP Benutzerdefinierte Zeichenfolge v2
- Japanese: SNMP Custom String v2
- Portuguese: SNMP Custom String v2
- Russian: SNMP Custom String v2
- Simplified Chinese: SNMP Custom String v2
- Spanish: Cadena (personalizado) (SNMP) v2
Consider the following remarks and requirements for this sensor:
Requirement |
Description |
|---|---|
Credentials |
This sensor requires credentials for SNMP in settings that are higher in the object hierarchy. |
Multi-platform probe |
You can add this sensor to a multi-platform probe. |
IPv6 |
This sensor supports IPv6. |
Performance impact |
This sensor has a very low performance impact. |
Lookups |
This sensor uses lookups to determine the status values of one or more channels. |
Scanning interval |
This sensor has a fixed minimum scanning interval for performance reasons. You cannot use a shorter scanning interval. Consequently, shorter scanning intervals in the Monitoring settings are not available for this sensor.
|
Knowledge Base |
Knowledge Base: How do I find out which OID I need for an SNMP Custom sensor? |
The sensor has the following default tags that are automatically predefined in the sensor's settings when you add the sensor:
- snmp
- snmpcustomsensor
For more information about basic sensor settings, see section Sensor Settings.
Setting |
Description |
|---|---|
OID |
Enter the OID of the object that you want to monitor. You can enter the numeric OID or the symbolic name. If you use the symbolic name, enter its full path. For example, iso.org.dod.internet.mgmt.mib-2.host.hrSystem.hrSystemUptime.hrSystemUptime. |
Search String |
Enter the string that you want to search for.
|
Search String Contains |
Select how PRTG processes the search string:
|
Interpret Result As |
Select how the sensor interprets the SNMP value returned by the OID:
|
Sensor Behavior |
Select how the sensor reacts based on the result of the string search:
|
Define if you want to extract a float value from the received string:
|
|
Regular Expression for Numeric Extraction |
This setting is only visible if you select Enable above. Enter a regular expression to define the float value that you want to extract from the string returned by the SNMP object at the specified OID. You can use capturing groups.
|
Index of Capturing Group |
This setting is only visible if you select Enable above. If your regex uses capturing groups, specify which one captures the number. Enter a 0-based index or leave the setting empty. If you leave this setting empty, the sensor uses group 0 if the expression matches the whole string exactly and group 1 if the expression matches a string partially.
|
Setting |
Description |
|---|---|
Primary Channel |
Select a channel from the list to define it as the primary channel. In the device tree, PRTG displays the last value of the primary channel below the sensor's name. The available options depend on what channels are available for this sensor.
|
Graph Type |
Define how this sensor shows different channels:
|
Stack Unit |
This setting is only visible if you select Stack channels on top of each other above. Select a unit from the list. PRTG stacks all channels with this unit on top of each other. By default, you cannot exclude single channels from stacking if they use the selected unit. However, there is an advanced procedure to do so. |
Setting |
Description |
|---|---|
Result Handling |
Define what PRTG does with the sensor result:
|
By default, all of these settings are inherited from objects that are higher in the hierarchy. We recommend that you change them centrally in the root group settings if necessary. To change a setting for this object only, click
under the corresponding setting name to disable the inheritance and to display its options.
For more information, see section Inheritance of Settings.
Number Extraction with Regular Expression
If you want to extract a number in the response string via a regex, note that the index for captures in this sensor is based on 1 (not on 0). Furthermore, capturing groups are not automatically created. The example below illustrates this issue.
Consider the following string as returned by a request for CPU usage:
5 Sec (3.49%), 1 Min (3.555%), 5 Min (3.90%)
Assuming you would like to filter for the number 3.555, this is the percentage in the second parentheses. Enter the following regex in the Regular Expression field:
(\d+\.\d+).*?(\d+\.\d+).*?(\d+\.\d+)
As Index of Capturing Group, enter 3. This extracts the desired number 3.555.
The index must be 3 in this case because the capturing groups here are the following:
- Group 1 contains 3.49%), 1 Min (3.555), 5 Min (3.90
- Group 2 contains 3.49
- Group 3 contains 3.555
- Group 4 contains 3.90
Keep this note about index and capturing groups in mind when using number extraction.
It is not possible to match an empty string with the PRTG regex sensor search.
Which channels the sensor actually shows might depend on the target device, the available components, and the sensor setup.
Channel |
Description |
|---|---|
Downtime |
In the channel table on the Overview tab, this channel never shows any values. PRTG uses this channel in graphs and reports to show the amount of time in which the sensor was in the Down status. |
Extracted Number |
The float value extracted from the string
|
Response Time |
The response time |
String Found |
If the search string is found in the SNMP value returned by the OID
|
KNOWLEDGE BASE
What security features does PRTG include?




