Monitor Type with 1 expression for healthy and 2 for warning

Trying to get this to work but all shows healthy when there are som that should be warning.
Anyone notice where i might have gone wrong, cant find that many examples online.

<ConditionDetection ID="UnderWarningFilter" TypeID="System!System.ExpressionFilter">
        <Expression>
          <SimpleExpression>
            <ValueExpression>
              <XPathQuery Type="Integer">Property[@Name='PendingCount']</XPathQuery>
            </ValueExpression>
            <Operator>LessEqual</Operator>
            <ValueExpression>
              <Value Type="Integer">$Config/PendingCountThreshold$</Value>
            </ValueExpression>
          </SimpleExpression>
        </Expression>
      </ConditionDetection>
      <ConditionDetection ID="OverWarningFilter" TypeID="System!System.ExpressionFilter">
        <Expression>
          <And>
            <Expression>
              <SimpleExpression>
                <ValueExpression>
                  <XPathQuery Type="Integer">Property[@Name='PendingCount']</XPathQuery>
                </ValueExpression>
                <Operator>Greater</Operator>
                <ValueExpression>
                  <Value Type="Integer">$Config/PendingCountThreshold$</Value>
                </ValueExpression>
              </SimpleExpression>
            </Expression>
            <Expression>
              <SimpleExpression>
                <ValueExpression>
                  <XPathQuery Type="Integer">Property[@Name='DaysSincePatched']</XPathQuery>
                </ValueExpression>
                <Operator>Greater</Operator>
                <ValueExpression>
                  <Value Type="Integer">$Config/DaysSincePatchedThreshold$</Value>
                </ValueExpression>
              </SimpleExpression>
            </Expression>
          </And>
        </Expression>
      </ConditionDetection>

An <And> expression means ALL of the expressions inside must resolve in order for the filter to be selected.

You need to use an <Or> expression which means if ANY one of the expressions inside resolves then the filter is selected.

Have you run it through the workflow analyser?

It works as expected. There was a blank space before a ’ in the add.propertybag part of the MP.

Hi

I only want warning if both warningexpressions is true. Then AND must be correct right ?
So there should only be an alert if Pendingcount and Dayssincepatched are BOTH over the configured values.
And i have examples of servers were both these are true but it’s still shown as healthy. (have a eventlog write in the ps script that collects the propertybag for troubleshooting)

No, did try that with some other problem though. But was unable to get any data from remote agents. Can run the exe on management servers and connect to agents but only get enter/exit. Not really ever gotten it to work correctly.