Two gateway rules can be defined in order to achieve this requirement.
1. The first rule is to set the severity of the cell or sampler at managed entity <A> to critical or a desired severity.
2. The second rule is to count the number of severity for managed entity <A> using path aliases, then it will trigger the snooze action for managed entity <B>.
Here is a complete XML file as an example.
Snoozing ME2
<ruleGroup name="Snoozing ME2">
<rule name="using fkm as a trigger">
<targets>
<target>/geneos/gateway[(@name="test1")]/directory/probe[(@name="test_P")]/managedEntity[(@name="ME1")]/sampler[(@name="myFKM")][(@type="")]/dataview[(@name="myFKM")]/rows/row/cell[(@column="triggerDetails")]</target>
</targets>
<priority>1</priority>
<block>
<if>
<like>
<dataItem>
<property>@value</property>
</dataItem>
<string>error</string>
</like>
<transaction>
<update>
<property>state/@severity</property>
<severity>critical</severity>
</update>
</transaction>
<transaction>
<update>
<property>state/@severity</property>
<severity>ok</severity>
</update>
</transaction>
</if>
</block>
</rule>
<rule name="snooze ME2">
<targets>
<target>/geneos/gateway[(@name="test1")]/directory/probe[(@name="test_P")]/managedEntity[(@name="ME2")]</target>
</targets>
<priority>2</priority>
<pathAliases>
<pathAlias name="ME1">ancestor-or-self::probe/managedEntity[(@name="ME1")]/sampler[(@name="myFKM")][(@type="")]/dataview[(@name="myFKM")]/rows/row/cell[(state("severity")="3")][(@column="triggerDetails")]</pathAlias>
</pathAliases>
<block>
<if>
<gt>
<count>
<dataItems>
<pathAlias ref="ME1"></pathAlias>
<property>@value</property>
</dataItems>
</count>
<integer>0</integer>
</gt>
<transaction>
<action ref="to snooze ME2"></action>
</transaction>
</if>
</block>
</rule>
</ruleGroup>
To snooze ME2
<action name="to snooze ME2">
<internalCommand>
<name>/SNOOZE:manual</name>
<args>
<arg target="1">
<static></static>
</arg>
</args>
</internalCommand>
</action>
Comments
0 comments
Please sign in to leave a comment.