• No results found

A Simple Filter

In document TelAlert UMS Administrator Guide (Page 167-170)

10.3.1 The Scenario

David is the sole support technician for a small company. For simplicity’s sake, the company’s network monitoring application is set up to generate a TelAlert alert for every network event it detects. David wants to tell TelAlert how to determine which ones it should send to him and which ones it should suppress. He is interested in receiving a page only when there is an event pertaining to a server or router.

10.3.2 Procedure

To set up this simple filter, David first creates the following [

Filter

] definition and refers to it in his destination:

[Filter]

...

{DavidFilter}

Active=True

RequiresFullMatch=False Exclusive=False

Tags=Router,Server [Destinations]

...

{DavidTextPager}

Configuration=ATTWichitaTextPager PIN=3456789

Filter=DavidFilter

The relevant line in the [

Destinations

] definition is

Filter=DavidFilter

. The significance of the values in the [

Filter

] definition is as follows:

Active—Set to

True

, this makes the [

Filter

] definition available for use by TelAlert.

RequiresFullMatch—Set to

False

, this means that a minimum of one tag specified in the

[

Filter

] definition must be matched by a tag specified on the command line for the destination to be deemed a “match.” Set to

True

, this means that all tags specified in the [

Filter

] definition must be matched by those on the command line. How a match is treated is determined by the

Exclusive

setting.

Exclusive—This determines how TelAlert treats a destination that it, on the basis of the tags specified and the

RequiresFullMatch

value, views as a “match.” When this is set to

False

, TelAlert will include—i.e., will deem valid—a matching destination while excluding all non-matching destinations. When this is set to

True

, TelAlert will exclude—i.e., will not send to—a matching destination while sending to all non-matching destinations. For example:

{ExclusiveFilter}

Comment=Tags that you do not want to receive Active=True

Exclusive=True

RequiresFullMatch=False Tags=Death,Taxes

{InclusiveFilter}

Comment=Tags that you want to receive Active=True

Exclusive=False

RequiresFullMatch=False Tags=Love,Money

Tags—The values entered here serve solely as a means for determining a match or non-match between a command and a destination. Even though TelAlert understands a tag only as a string of characters to compare against another string of characters, you should name your tags so that you can understand what they refer to.

Having created this [

Filter

] definition and added this line to {

DavidTextPager

}, David then modifies the network monitoring application so that, in passing news of an event to TelAlert, it specifies a tag on the command line—

server

,

router

,

modem

,

printer

, etc.—so that the complete command looks like this:

telalertc -i DavidTextPager -m "node down" -tags router

Here, the message is sent because (1) the destination is a match (since one tag matches and a full match is not required); and (2)

Exclusive

is set to

False

(meaning that matching destinations, and only matching destinations, are included). Note that:

 If he changed the

Exclusive

setting to

True

, the [

Filter

] definition would operate exclusively: i.e., the message would not be sent because TelAlert would exclude it, along with any other matching destinations.

 If he changed

RequiresFullMatch

to

True

and left

Exclusive

set to

False

, the message would not be sent. The destination is not a match because not all of the [

Filter

] definition’s tags appear on the command line. As a non-match, the destination is excluded, since the

Exclusive

setting specifies that only matching destinations are to be included.

 If he changed

RequiresFullMatch

to

True

and

Exclusive

to

True

, the message would be sent. The destination is not a match because not all of the [

Filter

] definition’s tags appear on the command line. As a non-match, the destination is included, since the

Exclusive

setting specifies that only matching destinations will be excluded.

Now, in light of the original settings presented above, consider this command:

telalertc -i DavidTextPager -m "node down" -tags printer

Here, the message is not sent because (1) the destination is a non-match (since the tag specified here does not match any specified in the [

Filter

] definition); and (2)

Exclusive

is set to

False

(meaning that matching destinations, and only matching destinations, are included). Note that:

 If he changed the

Exclusive

setting to

True

, the [

Filter

] definition would operate exclusively, but here the message would be sent because TelAlert excludes only matching destinations and includes all non-matches.

 If he changed

RequiresFullMatch

to

True

and left

Exclusive

set to

False

, the message would not be sent. The destination is not a match because none of the [

Filter

] definition’s tags appear on the command line. As a non-match, the destination is excluded, since the

Exclusive

setting specifies that only matching destinations are to be sent to.

 If he changed

RequiresFullMatch

to

True

and

Exclusive

to

True

, the message would be sent. The destination is not a match because none of the [

Filter

] definition’s tags appear on the command line. As a non-match, the destination is included, since the

Exclusive

setting specifies that only matching destinations will be excluded.

In the case of events that David wanted to be informed of no matter what, he would set up the network monitoring application to issue appropriate commands without a

-tags

value:

telalertc -i DavidTextPager -m "power outage"

Without a

-tags

value on the command line, the [

Filter

] definition linked to the destination does not come into play at all.

In document TelAlert UMS Administrator Guide (Page 167-170)