Поделиться через


Part 2: Use VSAE fragments to dynamically discover an application based on the existence of a registry key or value

<!--[if lt IE 9]>

<![endif]-->

Comments

  • Anonymous
    June 08, 2016
    Hi Kevin. Looking at the first installment mpx in the library, I noticed on lines 51 and 55 some comments:"...since the default is boolean, we use "string"..."Should not we use type boolean if we are checking a boolean registry attribute definition? If it's of type string, and the registry attribute definition is a boolean, I'm thinking it would always evaluate to true.
    • Anonymous
      June 08, 2016
      @ Jonathan - As long as AttributeType = 0, then you can use string or Boolean. They will be evaluated the exact same way. If you look at the code spit out by the SCOM 2007 R2 authoring console, it uses a String XpathQuery and Value Type. MPAuthor uses Boolean. When AttributeType=0, the expression "XPathQuery Type="String">Values/##AppName##RegKeyExists</XPathQuery" will resolve to True or False only.
      • Anonymous
        June 10, 2016
        Ok. I remember dealing with this years back, and had some problems when types between the attribute definition and the expression filter did not match (particularly when dealing with boolean and string), but maybe this does work as expected in this case. Do you think it's a good practice to use the same type in the expression filter as what is specified in the attribute definition?
        • Anonymous
          June 10, 2016
          As a general rule - absolutely.I was also trying to keep as few variables as possible in this ever-growing fragment library, so customers could change the fewest things and still have a working MP. However, the more I work with and try to understand all our native modules and their inputs and outputs, the more I like just using a PowerShell module to do whatever I want.
  • Anonymous
    June 14, 2016
    The comment has been removed
    • Anonymous
      June 14, 2016
      I actually did that on purpose - because that is only a SINGLE location in the XML for the registry value - and this seems like it would help customers to provide an example full path to the registry. The find and replace token for this one is really more of a guide to know you need to do "something" there. If a customers wanted to remove all that with their own customized version of the fragment - they should.
  • Anonymous
    June 20, 2016
    Hi Kevin,Excellent set of articles .... great work! Do you have a discovery fragment example to perform a WMI discovery?Thanks
  • Anonymous
    September 10, 2016
    Excellent Article Kelvin.
  • Anonymous
    November 28, 2016
    Hi Kevin,I am very new in SCOM, and am in a very "cold water" in a complex IT infrastructure so that I must understand first SCOM 2012 and SCOM Authoring. I found your authoring article and wanted to "exercise" with it.Unfortunately your ZP packet does not incluse "Generic.Class.And.Discovery.Registry.KeyExists.Fragment.mpx". Forgotten? Or am I blind? :-)Best RegardsBirdal
  • Anonymous
    November 28, 2016
    I renamed them to make the names shorter in the latest download. Just take off "generic"
  • Anonymous
    January 10, 2017
    The comment has been removed
  • Anonymous
    January 10, 2017
    i am download from the below linkhttps://gallery.technet.microsoft.com/SCOM-Management-Pack-VSAE-2c506737but not find the file =" Generic.Class.And.Discovery.Registry.KeyExists.Fragment.mpx"kindly send me the link if you have some other reference.Thanks,Arjun Walmiki
  • Anonymous
    January 10, 2017
    yes i have old name :- Generic.Class.And.Discovery.Registry.KeyExists.Fragment.mpx. new name :- Class.And.Discovery.Registry.KeyExists.Regards,Arjun Walmiki
  • Anonymous
    January 26, 2017
    Hi Found this like and the parts are excellent learning for a newbie like me. The question i had is , is it possible to add several classes to one project. I.E. if i want to make a MP for RDS infrastructure that includes the RDSBroker, RDSGateway and RDS License server. I have created a new project and added a clase with registry key for rdsbroker that is looking at /System/CurrentControlSet/Services/Tssdis. If i wanted to target multiple registry keys such as the TSGateway and TermServLicensing keys how would i acomplish this. Would i import the Class.AndDiscovery.Registry.KeyExists.MPX a second time and modify it with the relevant info?
    • Anonymous
      January 27, 2017
      Yes.Or, you could use the registry discovery for a "seed" class which is not used for monitoring, but for lightweight registry discoveries only. Then you could target that class for additional discoveries of specific roles, and use registry wmi, or script based discoveries for each class. The base class for those can be local application still, or use can use more complicated abstract base classes for "RDS Server" or something like that. And you can build relationships between the classes if needed, such as "RDS Server hosts RDS Broker", but again - this would only be for health rollups between classes, and special grouping..... it is not required. It just makes a sexier, more useful looking MP. If you want to get that advanced - look at some of the microsoft MP's for ideas. However, I'd say those are for more experienced MP authors.
  • Anonymous
    November 22, 2017
    Kevin as always the most helpful guy :) !!! SCOMming is much easier with your Fragments Library and all your posts and contribution in Microsoft Support.Thank You Kevin!