locked
Weird issue with Condition Detection RRS feed

  • Question

  • Hi all,

    I'm working on a custom monitor using VSAE and the idea is fairly simple, even if I had to go about things in slightly round-about manner. In a nutshell, I'm connecting to an Oracle database to determine the max number of connections, current number of connections, and then doing some simple math to determine utilization as a percentage based on those numbers. To avoid figuring out how to do this in bash, I'm targeting a resource pool that I created and passing credentials to the script using a RunAs account/profile that I created in SCOM.

    All of this works as intended!

    So, here's where my issue comes in and where I'm slightly confused. In the condition detection for the monitor I have two overrideable parameters for a warning and error threshold. By default their values are 50 and 75 respectively. Here is the condition detection XML:

    <ConditionDetection ID="ErrorFilter" TypeID="System!System.ExpressionFilter">
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery Type="Double">Property[@Name='Percent']</XPathQuery>
                      </ValueExpression>
                      <Operator>GreaterEqual</Operator>
                      <ValueExpression>
                        <Value>$Config/errThresh$</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                </ConditionDetection>
                <ConditionDetection ID="WarnFilter" TypeID="System!System.ExpressionFilter">
                  <Expression>
                    <And>
                      <Expression>
                        <SimpleExpression>
                          <ValueExpression>
                            <XPathQuery Type="Double">Property[@Name='Percent']</XPathQuery>
                          </ValueExpression>
                          <Operator>Less</Operator>
                          <ValueExpression>
                            <Value>$Config/errThresh$</Value>
                          </ValueExpression>
                        </SimpleExpression>
                      </Expression>
                      <Expression>
                        <SimpleExpression>
                          <ValueExpression>
                            <XPathQuery Type="Double">Property[@Name='Percent']</XPathQuery>
                          </ValueExpression>
                          <Operator>GreaterEqual</Operator>
                          <ValueExpression>
                            <Value>$Config/warnThresh$</Value>
                          </ValueExpression>
                        </SimpleExpression>
                      </Expression>
                    </And>
                  </Expression>
                </ConditionDetection>
                <ConditionDetection ID="SuccessFilter" TypeID="System!System.ExpressionFilter">
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery Type="Double">Property[@Name='Percent']</XPathQuery>
                      </ValueExpression>
                      <Operator>Less</Operator>
                      <ValueExpression>
                        <Value>$Config/warnThresh$</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                </ConditionDetection>

    The problem I seem to be running into is that the state is changing at the wrong values. As in, if I receive a value of 6 from the script, the state goes to warning. If I receive a value of 8, the state goes to error. Based on this, I'm assuming that the second digit in $Config/errThresh$ and $Config/warnThresh$ is simply being ignored.

    I've never seen anything like this and I've tried about everything I can think of, but the only thing that seems to work is moving the condition detection into the script itself. I'd rather not do this as that means I have to pass the parameters to the script and the data source is being used for this monitor as well as three performance collection rules I created so we can see historical connection data.

    Any input anyone could offer would be greatly appreciated!

    Andy

    Wednesday, April 10, 2019 2:15 PM