Creating a new target
Updated: May 13, 2016
Applies To: System Center 2012 R2 Operations Manager, System Center 2012 - Operations Manager, System Center 2012 SP1 - Operations Manager
There are multiple methods that you can use to create a new class that can be used as a target for monitors and rules in System Center 2012 – Operations Manager. You can use a separate tool such as MP Authorthat will allow you to directly create targets. Advanced authors can refer to the Service Model section of the System Center Management Pack Authoring Guide for detailed information on creating a complex class model for their application. This advanced information is not required though to create a basic class that can act as a target for monitors and rules specific to a particular application.
Management Pack Templates
The following management pack templates in the Operations console create a class that can be used as a target for monitors and rules:
Windows Service Template
If your application has service a Windows installed on each server, then you should use the Windows Service Template. This will create a new class and discover an instance on all agent computers with the service installed. If any monitors or rules use this class as a target, then they will run on those same agents.
Process Monitoring Template
If your application does not have a Windows service but does have a process that is running on the agent computer, then you should use the Process Monitoring Template. This will create a new class and discover an instance on all computers in a specified group. If any monitors or rules use this class as a target, then they will run on those same agents.
Unix/Linux Service
If your application has a service on a Unix or Linux server, then you should use the UNIX or Linux Process template. This will create a new class and discover an instance on all agent computers with the service installed.
Simple class using Authoring Console
The System Center Operations Manager 2007 R2 Authoring Console is typically used by advanced users for custom management packs. It can be used though to create a simple class and discovery that you can then install in your management group and perform further authoring using the Operations console.
In addition to the class, you must create a discovery so that instances of the class can be created on agents where the application is installed. The Authoring Console provides a wizard that creates a discovery based on the Windows registry. This will allow you to specify criteria such as the name of a registry key. If the key is present, then the application is installed, and an instance of the class should be created.
To create a class and discovery in the Authoring Console
-
Open the Authoring Console.
-
Select File and then New.
-
On the Management Pack Template page, do the following:
In the Select a Management Pack Template pane, select Windows Application (Registry).
For the Management Pack Identity, type a name such as Contoso.MyApplication.
Note
This name may not contain spaces and should start with the name of the management pack.
Click Next.
-
On the Name and Description page, type a Display Name such as Contoso My Application for the management pack and click Next.
-
On the Windows Application page, do the following:
In the ID box, type a unique ID for the new class such as Contoso.MyApplication.MyTarget.
Note
This name may not contain spaces and should start with the name of the management pack.
In the Display Name box, type a display name for the new class such as My Application Target
Click Next.
-
On the Discovery Schedule page, set the schedule to 1 hour or more and click Next.
Note
This is the frequency that registry criteria on the agent computer will be evaluated to determine if an instance of the class should be created.
-
On the Registry Probe Configuration page, do the following:
Note
On this page, you specify the registry keys and values that your criteria will use.
Click Add.
Leave the Object Type set to Key.
In the Name box, type a name such as KeyExists.
Note
You can use any name that is descriptive. The name is not displayed to the user and is only used on the next page of the wizard.
In the Path box, type the path of the registry key to check such as SOFTWARE\MyApplication.
In the Attribute Type box, select Check if exists.
Click Next.
-
On the Expression Filter page, do the following:
Note
On this page, you specify the criteria for evaluating the registry data collected on the previous page.
Click Insert.
Click the ellipse button next to Parameter Name and select KeyExists.
In the Operator box, select Equals.
In the Value box, type True.
Click Create.
To install the management pack from the Authoring Console
-
Select Tools and then Export MP to Management Group.
-
Select or type in the name of a management server for your management group.
-
Click Connect.