PRTG Manual: Regular Expressions
For some sensors, you can use regular expressions to match a search pattern. PRTG supports Perl Compatible Regular Expression (PCRE).
The following sensors support using regular expressions:
- DHCP sensor
- File Content sensor
- HTTP Advanced sensor
- IMAP sensor
- Port sensor
- SNMP Custom String sensor
- WMI Custom String sensor
You can only use regular expressions for the respective sensors if you explicitly enable using regular expressions in the sensors' settings.
PRTG supports regular expression (regex) options in the form (?isgmxUJ) and their negations like, for example, (?-i). PRTG does not support regex flags like, for example, /g (global), /s (single line), or /gs, and does not correctly search for the target string if you try to set flags.
Find matches containing the word error or alarm:
Find matches containing the word ERROR, not error, using case sensitivity:
Find matches containing the words error and alarm, in any order:
Find matches containing all of the words tree, flower, leaf, and bug, in any order:
It is not possible to match an empty string using the PRTG regex search with sensors.
The search pattern
matches the following expressions:
- Alarm error
- Error alarm
- I am an error and I trigger an alarm.
- I am an alarm and I indicate an error.
- An alarm combined with an error indeed!
- An error combined with an alarm, too!
Regex101: Test and debug your regular expressions
Regex Tester: Test regular expressions interactively
Wikipedia: Regular expression
- Active Directory Integration
- Application Programming Interface (API) Definition
- Filter Rules for xFlow, IPFIX, and Packet Sniffer Sensors
- Channel Definitions for xFlow, IPFIX, and Packet Sniffer Sensors
- Define IP Ranges
- Define Lookups
- Regular Expressions
- Calculating Percentiles
- Add Remote Probe
- Failover Cluster Configuration
- Data Storage
- PRTG Housekeeping
- Using Your Own SSL Certificate