Home > MOM > Using regular expressions to prevent a rule from running on a agent or agents

Using regular expressions to prevent a rule from running on a agent or agents

Often I see people asking how to prevent a rule or several rules from running on a agent or agents.  It seems to be a common question.  Rule over-rides do not disable rules from running on agents, but instead let you modify thresholds.

If you want to prevent a rule from running on a agent then you have to go into the criteria tab of the rule, and click on the advanced button.  In the criteria selection you want to create something like this:

Agent does not equal %SERVERNAME%

Simple enough.  How about a group of servers, say with a similar naming convention?  Let’s say all our Exchange Bridgehead servers have BRD in their name.  The criteria may look like this:

Agent does not match regular expression ^.*(BRD).*$

Easy right?  Now lets make it so all Public Folder servers are excluded as well:

Agent does not match regular expression ^.*(BRD|PUB).*$

The above example expects that PUB is in the naming convention for your Public Folder servers.

You can get creative with regular expressions and they are a time saver.  When I create computer groups I use them for domains and computers to add to the group.  John Hann has a nice article on his blog describing regular expressions in more detail.  Check it out:

http://myitforum.techtarget.com/blog/jfhann/archive/2005/03/29/4296.aspx

Advertisements
Categories: MOM
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: