Creating a rule – Brocade Monitoring and Alerting Policy Suite Administrators Guide (Supporting Fabric OS v7.3.0) User Manual
Page 57
![background image](/manuals/361669/57/background.png)
The following example shows all rules on the switch. Notice that the policies are
not shown in the output.
switch:admin> mapsrule --show -all
-------------------------------------------------------------------
RuleName Action Condition
-------------------------------------------------------------------
Rule1 Raslog, Fence, SNMP Switch(SEC_IDB/Min>0)
Rule2 Raslog Switch(SEC_IDB/Hour>1)
NewRule1 Raslog, Fence, SNMP Switch(SEC_IDB/Min>0)
NewRule2 Raslog, Fence, SNMP Switch(SEC_IDB/Hour>1)
The following example shows the policy names associated with the rule name
“Rule1”.
switch:admin> mapsrule --show Rule1
RuleName: Rule1
Action: Raslog, Fence, SNMP
Condition: Switch(SEC_IDB/Min>0)
Policies Associated: daily_policy, crc_policy
Creating a rule
Each MAPS rule monitors a single condition. When you create a rule, you can choose to add it to a
policy.
To create a policy rule, complete the following steps.
1. Enter mapsRule --create rule_name followed by the rule parameters, and optionally the policy you
want to assign it to. Rule names are not case sensitive; My_Rule and my_rule are considered to be
the same.
2. Optional: Enter mapsRule --show rule_name to display the rule.
3. Optional: If you added the rule to the active policy, you must re-enable the policy for the rule to take
effect by entering mapsPolicy --enable policy policy_name.
NOTE
If you are specifying a group, the group must already exist.
Creating a rule to generate a RASLog message
The following example creates a rule to generate a RASLog message if the CRC
counter for a group of critical ports is greater than 10 in an hour. This rule is
added to the daily_policy, and the daily_policy is re-enabled for the rule to take
effect.
switch246:FID24:admin> mapsrule --create check_crc -monitor crc -group critical_ports
-t hour -op g -value 10 -action raslog -policy daily_policy
switch246:FID24:admin> mapsrule --show check_crc
Rule Data:
----------
RuleName: check_crc
Condition: critical_ports(crc/hour>10)
Actions: raslog
Policies Associated: daily_policy
switch246:FID24:admin> mapspolicy --enable daily_policy
Creating a rule
Monitoring and Alerting Policy Suite Administrator's Guide
57
53-1003147-01