locked
SCOM Discovery and ValueExpression on String content RRS feed

  • Question

  • Trying to write my own ManagementPacks

    I have created a discovery with target Windows.Computer.

    I want to discover all object with the ‘ServerName’ in Registry set to OfficeScan.service.local

       <Expression>

        <Expression>

         <SimpleExpression>

            <ValueExpression>

              <XPathQuery Type="String">Values/ServerName</XPathQuery>

            </ValueExpression>

         <Operator>Equal</Operator>

         <ValueExpression>

             <Value Type="String">OfficeScan.service.local</Value>

         </ValueExpression>

       </SimpleExpression>

      </Expression>

      <Expression>

    But it does not seem to work correctly with the string.

    The opposite version <Operator>NotEqual</Operator> seems to work as expected.

    All testst that I have done in MP simulator for the discovery seems to work (test are done on other computers due to firewall)

    If I change the expression to use a string without the "." it seems to work again. Are there anything I miss using the Equal operator and "." in the string?

    Thursday, May 21, 2015 7:40 AM

All replies

  • Servername that you use is it in the FQDN format?


    Blog: http://theinfraguys.com

    Follow me at Facebook The Infra Guys Facebook Page

    Join the Singapore System Center Admin Group SG System Center Admin Group

    Please remember to click Mark as Answer on the answer if it helps you in anyway

    Thursday, May 21, 2015 8:17 AM
  • After Several hours troubleshooting. 
    I belive I know alot more and can recreate the issue

      <SimpleExpression>
            <ValueExpression>
              <XPathQuery Type="String">Values/ServerName</XPathQuery>
            </ValueExpression>
         <Operator>Equal</Operator>
         <ValueExpression>
             <Value Type="String">OfficeScan.service.local</Value>
         </ValueExpression>
       </SimpleExpression>

    Running FilteredRegistrydiscover on ALL objects:
    2008R2, 2012, 2012R2 with the abowe settings. Everything is working as expected.
    Computers are added, and removed as I change registry values. Health Rollup is working etc.


    However then computer is 2008R2, with Remote Desktop Services enabled (and Citrix)
    Something happens with the ValueExpression. For me it seams that something crashes / stops working on the agentside. 
    I can't find anything in the logs that directs me to any known fault, but.

    Some computers are discoverred correctly (From 300 computers, maybe 10 of them) (Not sure the difference)
    Mostly all computer are not shown as discovvered at all.
    Then around 50 of the computers is added as objects in scom, all discovered properties lookes correct. But no Health rollup is starting.

    This issue only happens on Computer that is having Remote Desktop Services (and citrix) added to the computer. 
    Same OS version with the Remote desktop Service, everything is working.

    So here we are. Not sure how to proceed. Hopefully someone could help, is the ValueExpression correctly written?
    Windows.library in use is: 7.5.8501.0
    Agent version:  7.1.10184.0
    Thursday, May 21, 2015 1:31 PM
  • Yes. FQDN format in the string in registry.

    The issue lookes like it has nothing to do with the Content of the string. It is working on all types of Servers installations. But the once having issue is having Remote Desktop Services Enabled. 

    Thursday, May 21, 2015 1:33 PM