Hi Kevin Thanks for the advice.
That link makes perfect sense. Some servers may have one or two services, and other may have up to 20 services, depending on the product. My approach was to have a light weight seed class for servers, a second class for services, and then dynamic groups to segregate the different services. My flaw was targeting the class of services, I'll use the approach in the link to segregate the servers based on the services. Thanks Gareth From: [email protected] [mailto:[email protected]] On Behalf Of Kevin Holman Sent: 15 September 2014 01:57 PM To: [email protected] Subject: RE: [msmom] Creating custom classes and discoveries, dynamic groups and rules Why are you casting such a wide net? Why not create a class for each service and make this simpler. With 500 servers, and 2000 instances of a custom service, you are adding an avg of 40 instances per agent. This in itself isn't a "no-no" but you are adding a lot to the instance and monitoring load of each agent, especially if you are adding a lot of monitoring to these custom instances. As to your override - the reason it doesn't work is that you are trying to override a workflow targeting "Windows Server" class, with a group of instances that are not Windows Server, nor are they instances that contain Windows Server. You need to use a group containing Windows Computer instances (since WC contains WS) or Windows Server instances, to override a workflow running against the Windows Server class. You cannot target workflows to a group. Period. In your case I would create a group of Windows Computers, that contain instances of Gareth.MGSServices.Services.ApplicationComponent and where Servername contains MPV. http://blogs.technet.com/b/jonathanalmquist/archive/2010/07/22/how-to-create-a-group-of-windows-computers-based-on-a-discovered-property-of-virtually-any-class.aspx Then use that group of Windows Computer objects for your override. From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Gareth Miles Sent: Monday, September 15, 2014 4:24 AM To: [email protected]<mailto:[email protected]> Subject: [msmom] Creating custom classes and discoveries, dynamic groups and rules Hi My company develops all our software and services in house. I'm creating a custom seed class and discovery to discover all servers with custom services on them, then a second class and discovery to discover all the services on a server and the service details. Both of the classes and their discoveries work as expected, I then create a dynamic group to group a specific set of services. When I create a simple scripted rule and override the rule for the dynamic group, the management pack with the rule appears in "C:\Program Files\Microsoft Monitoring Agent\Agent\Health Service State\Management Packs" on the server, but the rule doesn't fire on its schedule, and a verbose trace shows no indication of the rule running. Here's more detail on what I've done to set this up. I've named the classes with their base class name so I know what's what, it will be named differently in production. The seed class has a custom property of service name which won't be used in production, the default display name is sufficient. This is created in its own unsealed MP which I can send through for more clarity if need be. Seed class (Gareth.MGSServices.Services.LocalService) Base Class: Microsoft.Windows.LocalService Property 1: Servicename Relationship: Microsoft.Windows.ComputerHostsLocalApplication Seed class discovery (Gareth.MGSServices.Services.LocalService.Discovery) Target: Windows.Server.Computer Discovered Class: Seed Class Configuration: WMI query on existence of win32_service service by name. Service Class (Gareth.MGSServices.Services.ApplicationComponent) Base Class: Microsoft.Windows.ApplicationComponent Property 1: StartMode Property 2: State Property 3: ExePath Property 4:Version Property 5: ServerName Relationship: Windows.Server.ComputerHostsApplicationComponent Service Class Discovery (Gareth.MGSServices.Services.ApplicationComponent.Discovery) Target: Seed Class Discovered Class: Service Class Configuration: VB script gathering service information into variables, creating class instance, adding System.Entity & WindowsComputer properties, then the 5 custom properties into the discovery data. At this point all is good. I have two classes, one with 500 odd servers, the other with 2000 odd services. I then create a dynamic group with the following query ( Object is Gareth.MGSServices: Services (ApplicationComponent) AND ( ServerName Contains MPV ) AND True ) So now I have a group of MPV services, so far so good. My troubles start when I try to get a rule to trigger against the group using an override. I've setup two rules that are both custom script write action rules that simply write an event to the event log when the schedule triggers the alert. One rule is targeted at windows server, is disabled, and overridden enabled for the group, I suspect this target is incorrect. The other was created in SCOM and is targeted directly at the group, I did get a warning saying that the rule will run against the group and not the members. Please can anyone give me some advice on this matter. Are the base classes of the two classes the correct ones to use, I suspect I'm making an error in the way I'm targeting the group. Any help would be appreciated. Kind Regards Gareth Miles ________________________________ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Furthermore, the information contained in this message, and any attachments thereto, is for information purposes only and may contain the personal views and opinions of the author, which are not necessarily the views and opinions of the company. ________________________________ ############################################################################################# The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Furthermore, the information contained in this message, and any attachments thereto, is for information purposes only and may contain the personal views and opinions of the author, which are not necessarily the views and opinions of the company. #############################################################################################
