Try with <XPathQuery>//*[local-name()="StdOut"]</XPathQuery>
Linux Discovery
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
2 answers
Sort by: Most helpful
-
-
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.sorry, I have Problems with input the code!
I don't find any answer.