Connectrix: How to Clone a MAPS Default Policy
Summary: This article explains the steps involved cloning a default policy in MAPS configuration and activating the new cloned maps policy.
Instructions
To create and activate a modified version of a default policy, perform the following steps:
-
Create a copy of the default policy:
switch:admin> mapspolicy --clone dflt_conservative_policy -name my_policy
-
Modify the rules in the policy based on the requirements:
You cannot modify the default rules, but you can add rules to and delete rules from the policy. You can also create or clone rules and add them to the policy.
-
Use the mapsPolicy command to add and delete rules to and from the policy. Use the mapsRule command to create rules and add them to the policy.
#mapspolicy --delete
-
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 email 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
Automatic Creation of MAPS Rules and Policies.