I have enabled a file content sensor to monitor a alert.txt file. I want 2 search strings to be enabled as AND/OR to trigger the sensor as a warning if it shows up.

I currently have it working perfectly with one string "SRV2006" But i want two strings "SRV2006" and "SRV2008"

I have tried all sorts of regular expressions but i cant seem to get it working.

any idea's?


Article Comments

The following regex should do the trick:

(SRV20[0-9][0-9])

Feb, 2017 - Permalink

Thanks Stephan,

So make sure my sensor is regular expression and copy and paste that string exactly with all brackets?


Feb, 2017 - Permalink

Exactly :)


Feb, 2017 - Permalink

Thanks, Tested and worked. Not that my log files show up other error codes that i know of but what if it shows SRV2007? this regular expression will alarm anything from 0-9 on the last digit correct?

anyway to remove other numbers and only have 6 and 8 as the last digits?


Feb, 2017 - Permalink

It match everything from SRV2000 to 2099 :)


Feb, 2017 - Permalink

Can we make it only match SRV2006 and SRV2008?


Feb, 2017 - Permalink

Sure: SRV(2006|2008)


Feb, 2017 - Permalink