Hello,
I would like to use the sensor IMAP for various backup solutions. That's why I have the following regular expression in use:
\b(error|alarm|warning|critical|fehler|error|failed|achtung)\b/ig
This also works as long as the words are lowercase. Problems are here, e.g. "Fehler" or "ERROR". Is "/ig" not correct to disable case sensitive?
Gerard
Article Comments
Hi Gerard,
Thanks for the question. Unfortunately, PRTG doesn't support regex options, I've tripped over that as well in the past. From the manual:
PRTG supports Perl Compatible Regular Expressions (PCRE).
PRTG does not support regex options or regex flags like, for example, /g (global), or /s (single line), or /gs, and will not correctly search for the target string if you try to set options.
You'll need to use PowerShell in combination with a EXE/Script (Advanced) Sensor to make use of regex options (within PowerShell) :)
PRTGapi |
Feature Requests |
WMI Issues |
SNMP Issues
Kind regards,
Stephan Linke, Tech Support Team
Mar, 2019 - Permalink
Hi Gerard,
Thanks for the question. Unfortunately, PRTG doesn't support regex options, I've tripped over that as well in the past. From the manual:
PRTG supports Perl Compatible Regular Expressions (PCRE).
PRTG does not support regex options or regex flags like, for example, /g (global), or /s (single line), or /gs, and will not correctly search for the target string if you try to set options.
You'll need to use PowerShell in combination with a EXE/Script (Advanced) Sensor to make use of regex options (within PowerShell) :)
PRTGapi | Feature Requests | WMI Issues | SNMP Issues
Kind regards,
Stephan Linke, Tech Support Team
Mar, 2019 - Permalink