Linux Discovery

H S 216 Reputation points
2020-09-23T12:36:51.047+00:00

Hello!

I have a problem with a linux dicovery.
I want to discover a Linux System with a command: ps -ef | grep tomcat | grep "wd-" | wc -l
With a condition Detection I will fill the Class if Return greater 0.

Here is the Probe Action

<ProbeAction ID="ProbeAction" TypeID="MUSL!Microsoft.Unix.ShellCommand.ProbeAction">
                <TargetSystem>$Config/TargetSystem$</TargetSystem>
                <UserName>$Config/UserName$</UserName>
                <Password>$Config/Password$</Password>
                <ShellCommand>$Config/ShellCommand$</ShellCommand>
                <TimeOut>$Config/TimeOut$</TimeOut>
                <TimeOutInMS>$Config/TimeOutInMS$</TimeOutInMS>
              </ProbeAction>

Here is the conditiondetection

 <ConditionDetection ID="Mapper" TypeID="System!System.Discovery.FilteredClassSnapshotDataMapper">
                <Expression>
                  <RegExExpression>
                    <ValueExpression>
                      <XPathQuery>$Data///*[local-name()="StdOut"]$</XPathQuery>
                    </ValueExpression>
                    <Operator>MatchesRegularExpression</Operator>
                    <Pattern>^[1-9][0-9]*</Pattern>
                  </RegExExpression>
                </Expression>

then I will get following error:

The Microsoft Operations Manager Expression Filter Module failed to query the delivered item, item was dropped.

Property Expression: $Data/Context///*[local-name()="StdOut"]$

Error: 0x80004005

One or more workflows were affected by this.

I don?t find the error.

rg
Hansi

Operations Manager
Operations Manager
A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.
1,428 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. CyrAz 5,181 Reputation points
    2020-09-23T13:33:12.173+00:00

    Try with <XPathQuery>//*[local-name()="StdOut"]</XPathQuery>

    0 comments No comments

  2. H S 216 Reputation points
    2020-09-24T14:05:37.677+00:00

    Hello!

    same problem

    And if I try to run a Powershell i get an error:

    The PowerShell script could not be started because the following data item reference could not be resolved.
    $Data///*[local-name()="StdOut"]$ Please check your script parameters to verify all of the data items specified are correct.

    28151-2020-09-24-16-04-30-new-2-notepad.png

    sorry, I have Problems with input the code!

    I don't find any answer.

    0 comments No comments