Saturday, April 4, 2015

UNIX/Linux Log File Monitor RegEx Sample

In SCOM you’ve the option to use Monitoring Templates to monitor log files for patterns you define.

In the ootb template you only have the option for one regex pattern. But what if you like to query for positive pattern and negatives as well?

Easy, as long as you understand how to build regular expressions.

In my sample I’m searching for the pattern ‘positive’ while the string should not match the pattern ‘negative’.

Here’s the regex you could use:

You can test the regex against a sample string directly from the wizard:



Furthermore, you could search for multiple patterns. Here’s the regex you could use:

Happy RegEx’ing!

All information is provided "as is" without any warranty! Try in lab before. Handle with care in production.
Read Full Post...