Hello Ron, the syntax used by "regcomp" should work. Nice features available in Oniguruma Regex or extended Regex are not supported.
See https://pubs.opengroup.org/onlinepubs/009696599/functions/regcomp.html https://pubs.opengroup.org/onlinepubs/009696599/basedefs/xbd_chap09.html for some additional information. Regards, Lutz Am 08.04.25 um 22:12 schrieb Ron Kelley: > Yes, that seems to work. But, what other options can you suggest? I am > looking at much longer keywords to alert on. > > Thanks, > > -Ron > >> On Apr 8, 2025, at 1:51 PM, M/Monit Support <supp...@mmonit.com> wrote: >> >> >> Hello, >> >> There are many ways how to write the regular expression, did you try >> something like this?: >> >> if match '[Ee][Rr][Rr][Oo][Rr]' then alert >> >> Best regards, >> The M/Monit team >> >> >>> On 8. 4. 2025, at 18:08, Ron Kelley <rkelley...@gmail.com> wrote: >>> >>> Greetings all, >>> >>> I am trying to do a case-insensitive match for the words “error” and “out >>> of memory” on our DB servers and am not having much luck. I saw a few >>> threads from +5yrs ago but the suggestions don’t seem to work. Also, I >>> looked over the monit manual and the regex(7) man page but I am still not >>> able to get a simple match working. One thread suggests to modify the >>> source code and recompile, but that does not seem to help (I downloaded and >>> compiled monit version 5.34.4) . >>> >>> Specifically, the syntax: "if match '(?i)error' then alert” throws the >>> error: "Regex parsing error: Invalid preceding regular expression >>> ''(?i)error’’ >>> >>> >>> Any hints for an easy-to-use case-insensitive match string? >>> >>> Thanks. >> >