Attributes
Updated: May 13, 2016
Applies To: System Center 2012 R2 Operations Manager, System Center 2012 - Operations Manager, System Center 2012 SP1 - Operations Manager
Attributes in Operations Manager are properties of a class. Each instance of the class has the same set of attributes, but each instance can have its own value for each attribute. These values are populated when the object is discovered.
Uses for Attributes
The following table lists different ways that attributes can be used.
Management Pack Element |
How attributes can be used |
---|---|
Views and Dashboards |
A view or dashboard can include all objects with a particular value for an attribute. |
Groups |
A group can define criteria for dynamic membership that populates the group with all objects that have a particular value for an attribute. |
Monitors and Rules |
The value of an attribute can be used in the definition of the monitor or rule. For example, a monitor may run a script that requires information from the target object. An attribute could be used as a command line parameter sent to the script. |
Alert Descriptions |
An alert description created by a monitor or rule can include values from the data or from the attributes of the target object. |
Custom Attributes
You may want to add custom attributes to existing classes so that you can collect additional information supporting views and groups in your environment. You can add attributes to any class and populate it with data retrieved from the registry or from a WMI query.
When you create a new attribute, a new class is created based on the existing class. The new class has the new attribute and inherits all of the attributes from the original class, so that it is interchangeable with the original class. In order to use the new attribute, you must select the new class. An instance of the new class will be discovered for each member of the original class and the new attribute populated only on those agents where the specified data is found.
Warning
When you create a new attribute in the Operations console, a new class is created for each custom attribute that you create. Even if you create multiple attributes on the same class, a new class will be created for each one. Too many classes can result in excessive overhead. If you create more than a few custom attributes for a class, you should use another tool such as the System Center Operations Manager 2007 R2 Authoring Console that will allow you to create a single class with multiple attributes.
Wizard Options
When you run the Create Attribute Wizard, you will need to provide values for options in the following tables. Each table represents a single page in the wizard.
General Properties
The General Properties page includes the name and description of the attribute.
Option |
Description |
---|---|
Name |
The name of the attribute that will be displayed in the Operations console. |
Description |
Optional description of the attribute. |
Discovery Method
The Discovery Method page includes the method for populating the attribute and the class that it will target.
Option |
Description |
---|---|
Discovery Type |
Specifies if the value of the attribute will be populated from the registry or from a WMI query. |
Target |
The class to which to add the attribute. |
Management Pack |
Management pack to store the attribute. For more information on management packs, see Selecting a Management Pack File. |
Registry Probe Configuration
The Registry Probe Configuration page includes the details of the registry key or value used to populate the attribute. This page is only displayed if the Discovery Type is Registry.
Option |
Description |
---|---|
Key Or Value Type |
Specifies if a registry key or registry value will be used. The data in a registry value can be used for the attribute, while it can only return a true or false indicating if a registry key exists. |
Path |
The path to the registry key or value. |
Attribute Type |
The type of data stored in the registry value. Check if exists can be selected if you only want to determine if a registry key or registry value exists. |
Frequency |
Specifies how often the discovery of the attribute should run. This should typically be a value of an hour or higher since the values of attributes rarely change. |
WMI Configuration
The WMI Configuration page includes the details of the WMI query used to populate the attribute. This page is only displayed if the Discovery Type is WMI Query.
Option |
Description |
---|---|
WMI Namespace |
The WMI namespace with the class used in the query. |
Query |
The WMI query to run. |
Property Name |
The name of the property from the WMI query with the value to populate the attribute. |
Frequency |
Specifies how often the discovery of the attribute should run. This should typically be a value of an hour or higher since the values of attributes rarely change. |
Creating custom attributes
The following example procedure creates an attribute with the following details:
New attribute named Location on all instances of Windows Computer.
Value populated from a registry key at HKLM\SOFTWARE\Contoso\Location.
To create a new attribute using the registry
-
If you don’t have a management pack for the application that you are monitoring, create one using the process in Selecting a Management Pack File.
-
In the Operations console, select the Authoring workspace, and then expand Management Pack Objects.
-
Right-click Attributes and select Create a new attribute.
-
On the General page, do the following:
In the Name box, type Location.
Click Next.
-
On the Discovery Method page, do the following:
In the Discovery Type dropdown, select Registry.
Click Browse to select the target class.
Select Windows Computer and then click OK.
In the Management Pack box, select the management pack from step 1.
Click Next.
-
On the Registry Probe Configuration page, do the following:
For Key or Key Value Type select Value.
In the Path box, type SOFTWARE\Contoso\Location.
In the Attribute Type dropdown, select String.
In the Frequency box, type 3600 seconds.
Click Finish.
The following example procedure creates an attribute with the following details:
New attribute named Manufacturer on all instances of Windows Computer.
Value populated from a WMI query using the Win32_ComputerSystem class.
To create a new attribute using WMI
-
If you don’t have a management pack for the application that you are monitoring, create one using the process in Selecting a Management Pack File.
-
In the Operations console, select the Authoring workspace, and then expand Management Pack Objects.
-
Right-click Attributes and select Create a new attribute.
-
On the General page, do the following:
In the Name box, type Location.
Click Next.
-
On the Discovery Method page, do the following:
In the Discovery Type dropdown, select WMI Query.
Click Browse to select the target class.
Select Windows Computer and then click OK.
In the Management Pack box, select the management pack from step 1.
Click Next.
-
On the WMI Configuration page, do the following:
In the WMI Namespace box, type root\cimv2.
In the Query dropdown, type select * from win32_computersystem.
In the Property Name box, type Manufacturer.
In the Frequency box, type 3600 seconds.
Click Finish.