For this exercise to succeed, you need to have the SQL Management Pack imported. This has been covered in exercise 03.
As Windows Performance collection rules are most often used, this section discusses the steps required to gather a performance counter not collected by OpsMgr by default. For this example, you will be collecting the % Processor Time counter for the SQL Server database engine process (sqlservr.exe).
- In the Operations console, open the Authoring workspace.
- Right-click Rules and select Create New Rule.
- Select Collection Rules -> Performance Based -> Windows Performance as the rule type.
- Select the Sample Management Pack you previously created as a target for the rule.
- Click Next to continue.
- Give the rule this name: SQL Server process CPU Time.
- Under rule target, click Select.
- Click View all targets.
- Target the most specific existing class for this example, which is the MSSQL on Windows: DB Enginge
- Click Next.
- Use the Select button to open the Select Performance Counter window.
- Object: Process (not processor).
- Select counter from the list: % Processor Time
- Select instance from list: sqlservr process (if this instance does not appear, choose any other and type sqlservr in the Instance variable after selecting OK).
- At the Performance Object, Counter, and Instance page, change the collection interval to 1 minute.
- Note. This is not a best-practice, but in class we don't want to wait too long for output.
- Click Next to continue to the final page of the wizard.
- The last page of the wizard allows you to configure optimized collections. Optimized collection reduces the amount of disk space a performance counter collection uses in the data warehouse. Leave it unselected.
- Click Create to create the performance collection rule.
- Confirm that the changed management pack is downloaded by the agent (verify the 1201 and 1210 events in the event log on the client computer).
- Open the My Workspace pane. Right click Favorite Views and select New -> Performance View.
- Enter the following name: SQL Server process performance.
- Under Select conditions, click collected by specific rules.
- Under criteria descritpion, click the blue specific hyperlink.
- In the list that appears, select the rule with the name you specified previously: SQL Server process CPU Time.
- Click Ok to close the wizard.
- The new view should contain the performance counter. Select it to display a graph.
- It might take several minutes for data to arrive.