Deployment Guide

Changing multiple parameters
The following example modifies the rule “check_crc2” to generate a RASLog
message and an e-mail message if the CRC counter for a group of critical ports
is greater than 15 in an hour (rather than 10 in a minute). This rule is part of the
active policy, so the policy is re-enabled for the change to take effect.
switch:admin> mapsrule --show check_crc2
Rule Data:
----------
RuleName: check_crc2
Condition: critical_ports(crc/minute>10)
Actions: RASLOG
Policies Associated: daily_policy
switch:admin> mapsrule --config check_crc2 -timebase hour -op g -value 15 -action
raslog,email -policy daily_policy
switch:admin> mapsrule --show check_crc2
Rule Data:
----------
RuleName: check_crc2
Condition: critical_ports(crc/hour>15)
Actions: RASLOG, EMAIL
Mail Recipient: admin@mycompany.com
Policies Associated: daily_policy
switch:admin> mapspolicy --enable daily_policy
Cloning a rule
You can clone both default and user-defined MAPS rules.
To clone a MAPS rule, complete the following steps.
1. Enter mapsRule --show rule_name to display the rule you want to clone.
2. Enter mapsRule --clone oldRuleName -rulename newRuleName [-group group_name | flow_name]
[-monitor ms_name] [-timebase day:hour:min] [-op l:le:g:ge:eq] [-value value] [-action action] to
duplicate the rule.
NOTE
If no parameters other than -rulename are specified, an exact copy of the original rule is created.
For more information on this command, refer to the Fabric OS Command Reference.
Creating an exact clone
The following example shows the existing rule (“old_rule” ), creates an exact
clone of that rule and names it “new_rule”, and then displays the cloned rule.
switch:admin> mapsrule --show old_rule
RuleName: old_rule
Action: Raslog, Fence, SNMP
Condition: Switch(SEC_IDB/Min>0)
Policies Associated: none
switch:admin> mapsrule --clone old_rule -rulename new_rule
switch:admin> mapsrule --show new_rule
RuleName: new_rule
Action: Raslog, Fence, SNMP
Condition: Switch(SEC_IDB/Min>0)
Policies Associated: none
Cloning a rule
Monitoring and Alerting Policy Suite Administrator's Guide 59
53-1003147-01