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.
#############################################################################################



Reply via email to