<rule name="Path Alias as Shell Variable">
    <targets>
        <target>/geneos/gateway[(@name=&quot;MNL_MAYA_GATEWAY_9370&quot;)]/directory/probe[(@name=&quot;MAYA_6370&quot;)]/managedEntity[(@name=&quot;MAYA&quot;)]/sampler[(@name=&quot;CPU&quot;)][(@type=&quot;Infrastructure&quot;)]/dataview[(@name=&quot;CPU&quot;)]/rows/row[(@name=&quot;Average_cpu&quot;)]/cell[(@column=&quot;percentUtilisation&quot;)]</target>
    </targets>
    <priority>1</priority>
    <pathAliases>
        <pathAlias name="percentKernelTime">../cell[(@column=&quot;percentKernelTime&quot;)]</pathAlias>
    </pathAliases>
    <block>
        <set>
            <var ref="PER_KERNEL_TIME"></var>
            <dataItem>
                <pathAlias ref="percentKernelTime"></pathAlias>
                <property>@value</property>
            </dataItem>
        </set>
        <if>
            <gt>
                <dataItem>
                    <property>@value</property>
                </dataItem>
                <integer>3</integer>
            </gt>
            <transaction>
                <userData>
                    <name>GW_PER_KERNEL_TIME</name>
                    <var ref="PER_KERNEL_TIME"></var>
                </userData>
                <update>
                    <property>state/@severity</property>
                    <severity>critical</severity>
                </update>
                <action ref="Send Alert"></action>
            </transaction>
            <if>
                <and>
                    <lte>
                        <dataItem>
                            <property>@value</property>
                        </dataItem>
                        <integer>3</integer>
                    </lte>
                    <gt>
                        <dataItem>
                            <property>@value</property>
                        </dataItem>
                        <integer>1</integer>
                    </gt>
                </and>
                <transaction>
                    <userData>
                        <name>GW_PER_KERNEL_TIME</name>
                        <var ref="PER_KERNEL_TIME"></var>
                    </userData>
                    <update>
                        <property>state/@severity</property>
                        <severity>warning</severity>
                    </update>
                    <action ref="Send Alert"></action>
                </transaction>
                <transaction>
                    <update>
                        <property>state/@severity</property>
                        <severity>ok</severity>
                    </update>
                </transaction>
            </if>
        </if>
    </block>
</rule>