Here's a sample which is extrapolated from my own policy files, where I had some ifAliases with the phrase "UPLK" that required specific monitoring.
(I had to clean some things out, so there may be minor typos).
The important part is to make sure that the two rules are ordered as
shown in policies.xml so that the more-specific rule is evaluated FIRST.
policy-settings.xml
<policy-settings name="IOS Polled Port Settings">
<!-- Set Port attribute ok_to_poll (0x11dd8) = TRUE -->
<set-attr-value id="0x11dd8" value="TRUE" />
<!-- Set Port attribute PollPortStatus (0x1280a) = TRUE -->
<set-attr-value id="0x1280a" value="TRUE" />
<!-- Set Port attribute AlarmOnLinkDownTrap (0x11fc2) = 1 -->
<set-attr-value id="0x11fc2" value="1" />
<!-- poll port every 300s -->
<set-attr-value id="0x10071" value="300" />
</policy-settings>
<policy-settings name="IOS UnPolled Port Settings">
<!-- Set Port attribute ok_to_poll (0x11dd8) = FALSE -->
<set-attr-value id="0x11dd8" value="FALSE" />
<!-- Set Port attribute PollPortStatus (0x1280a) = FALSE -->
<set-attr-value id="0x1280a" value="FALSE" />
<!-- Set Port attribute AlarmOnLinkDownTrap (0x11fc2) = 0 -->
<set-attr-value id="0x11fc2" value="0" />
</policy-settings>
policy-search-criteria.xml
<policy-search-criteria name="IOS Polled Port Search">
<and>
<!-- attribute 0x11ee8 = Model Class, value 15 = "Port" -->
<attr-match match-type="equal-to" id="0x11ee8" value="15" />
<!-- 2010-10-29 MJS - since we need to test 2 attributes,
use another search, since nesting does not seem to work -->
<policy-search-criteria-name name="IOS Port Text Search"/>
</and>
</policy-search-criteria>
<policy-search-criteria name="IOS Port Text Search">
<or>
<!-- attribute 0x11f7e = ifAlias, value contains "UPLK" -->
<attr-match match-type="contains" id="0x11f7e" value="UPLK"
/>
<!-- attribute 0x11f82 = Internal_If_Alias, value contains
"UPLK" -->
<attr-match match-type="contains" id="0x11f82" value="UPLK"
/>
</or>
</policy-search-criteria>
<policy-search-criteria name="IOS UnPolled Port Search">
<and>
<!-- attribute 0x11ee8 = Model Class, value 15 = "Port" -->
<attr-match match-type="equal-to" id="0x11ee8" value="15" />
</and>
</policy-search-criteria>
policy-rules.xml
<policy-rule name="IOS Polled Port Thresholds Rule" >
<port-policy-search-criteria-name name="IOS Polled Port Search"
/>
<policy-settings-name name="IOS Polled Port Settings" />
</policy-rule>
<policy-rule name="IOS UnPolled Port Thresholds Rule" >
<port-policy-search-criteria-name name="IOS UnPolled Port
Search" />
<policy-settings-name name="IOS UnPolled Port Settings" />
</policy-rule>
policies.xml
<policy-rule-name name="IOS Polled Port Thresholds Rule" />
<policy-rule-name name="IOS UnPolled Port Thresholds Rule" />
--Mark S
________________________________
Mark Serencha - Inforonics LLC - (m) +1-781-439-0519 -
[email protected] <mailto:[email protected]>
From: Mark Serencha
Sent: Tuesday, May 31, 2011 9:18 AM
To: '[email protected]'; spectrum
Subject: RE: [spectrum] Condition correlation
You can use Policy Manager to do this for Cisco IOS devices (Cisco CatOS
devices are different because the attributes involved are different, and
there was a bug that had to be fixed, but I have not checked 9.2 H04 to
see if it was resolved). We chose this because Policy Manager
re-evaluates policies on a set interval (default is 24 hours - we downed
that to 8 hours) so you don't have to "remember" to re-apply it.
Create one Policy Rule to activate certain attributes on interfaces with
your specified ifAliases.
Create another Policy Rule (with lower priority) to shut off the
attributes on any remaining interfaces.
I will get some examples from my policy XML files and re-post.
--Mark S
________________________________
Mark Serencha - Inforonics LLC - (m) +1-781-439-0519 -
Mark.Serencha_AT_inforoincs.com
From: [email protected] [mailto:[email protected]]
Sent: Tuesday, May 31, 2011 6:50 AM
To: spectrum
Subject: [spectrum] Condition correlation
I guess there are several ways to solve this little problem, I need
input on the best an simpliest alternative:
"We need to supress all alarms regarding ports UP/DOWN - EXEPT those
with port's ifAlias starting with RX, RF or LB"
How would you solve it?
Roberth Edberg
Global Network & Availability Mgmnt
SEB / Group IT
Web:
http://www.seb.se <http://www.seb.se/>
Systems Management
E-mail:
[email protected] <mailto:[email protected]>
Rissneleden 110
Voice:
+46 8 639 30 42
SE-106 40 Stockholm
Mobile:
+46 70 509 30 42
Fax:
+46 8 706 60 25
________________________________
- "Did you know that the first Matrix was designed to be a perfect human
world, where none suffered; where everyone would be happy. It was a
disaster. No one would accept the program. Entire crops were lost. Some
believed that we lacked the programming language to describe your
perfect world, but I believe that as a species, human beings define
their reality through misery and suffering. So the perfect world we
dreamed, but your primitive cerebrum kept trying to wake up from. Which
is why The Matrix was redesigned to this...the peak of your
civilization."
/ Agent Smith {The Matrix}
* --To unsubscribe from spectrum, send email to [email protected]
with the body: unsubscribe spectrum [email protected]
---
To unsubscribe from spectrum, send email to [email protected] with the body:
unsubscribe spectrum [email protected]<<image001.jpg>>
<<image002.gif>>
