Back to Geneos FAQ

Is there a way to snooze the managed entity <B> by the action from rule that is setup on sampler in managed entity <A>?

Two gateway rules can be defined in order to achieve this requirement.

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=&quot;test1&quot;)]/directory/probe[(@name=&quot;test_P&quot;)]/managedEntity[(@name=&quot;ME1&quot;)]/sampler[(@name=&quot;myFKM&quot;)][(@type=&quot;&quot;)]/dataview[(@name=&quot;myFKM&quot;)]/rows/row/cell[(@column=&quot;triggerDetails&quot;)]</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=&quot;test1&quot;)]/directory/probe[(@name=&quot;test_P&quot;)]/managedEntity[(@name=&quot;ME2&quot;)]</target>
        </targets>
        <priority>2</priority>
        <pathAliases>
            <pathAlias name="ME1">ancestor-or-self::probe/managedEntity[(@name=&quot;ME1&quot;)]/sampler[(@name=&quot;myFKM&quot;)][(@type=&quot;&quot;)]/dataview[(@name=&quot;myFKM&quot;)]/rows/row/cell[(state(&quot;severity&quot;)=&quot;3&quot;)][(@column=&quot;triggerDetails&quot;)]</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>
["Geneos"] ["Geneos > Gateway"] ["FAQ"]

Was this topic helpful?