beautypg.com

Modifying a default policy, Maps conditions – Brocade Monitoring and Alerting Policy Suite Administrators Guide (Supporting Fabric OS v7.3.0) User Manual

Page 49

background image

The following example adds a rule to the policy named daily_policy, displays the
policy, and then re-enables the policy so the change can become active.

switch:admin> mapspolicy --addrule daily_policy -rulename check_crc

switch:admin> mapspolicy --show daily_policy

Policy Name: daily_policy

Rule List :

check_crc

defALL_E_PORTSITW_21

defALL_E_PORTSITW_40

myCHASSISFLASH_USAGE_90

Active Policy is ’daily_policy’

switch:admin> mapspolicy --enable daily_policy

Modifying a default policy

You cannot modify any of the three predefined MAPS policies, but you can clone one to create a new
policy, and then modify that new policy.

To create and activate a modified version of a default policy, complete the following steps.

1. Create a copy of the default policy.

switch:admin> mapspolicy --clone dflt_conservative_policy -name my_policy

2. Modify the rules in the policy based on your requirements.

You cannot modify the default rules, but you can add rules to and delete rules from the policy, and
you can create or clone rules and add them to the policy.

Use mapsPolicy to add and delete rules to and from the policy. Use mapsRule to create rules and
add them to the policy.

3. Enable the policy.

switch:admin> mapspolicy --enable my_policy

The previously enabled policy is disabled, and the specified policy is enabled.

The following example clones the default policy, deletes two rules, and modifies
a rule to send an e-mail message in addition to a RASLog entry.

switch:admin> mapspolicy --clone dflt_conservative_policy -name rule_policy

switch:admin> mapspolicy --delrule rule_policy -rulename defCHASSISFLASH_USAGE_90

switch:admin> mapspolicy --delrule rule_policy -rulename defCHASSISMEMORY_USAGE_75

switch:admin> mapsrule --clone myCHASSISFLASH_USAGE_90 -monitor flash_usage -group

chassis -timebase none -op ge -value 90 -action raslog,email -policy rule_policy

switch:admin> mapspolicy --enable rule_policy

MAPS conditions

A MAPS condition includes a time base and a threshold. If the condition is evaluated as true, the rule is
triggered. The condition depends on the element that is to be monitored.

For example, if you specified a rule to be triggered if the CRC counter in the last minute is greater than
10, the threshold value is 10 and the time base is the preceding 60 seconds. In this rule, the condition is
the combination of the two; that is, the CRC value must be greater than the threshold value of 10 AND

Modifying a default policy

Monitoring and Alerting Policy Suite Administrator's Guide

49

53-1003147-01