Home » 2009 » January

Monthly Archives: January 2009

Author Custom Reports in Ops Mgr 2007

Operations Manager 2007 collects large amounts of data from your environment. By using the Reporting feature, you can create reports based on this data that provide additional information about the health of your environment. Operations Manager can have four types of reports

  • Published reports, automatically available in the console after ops mgr reporting installation
  • Linked reports, based on existing reports
  • Custom reports, authored from queries that you build in Visual Studio
  • Report solution, defined with Visual Studio and are available in a  management pack 

I always try to solve the new report request with a linked report if possible. The next step is to use the built-in SQL Report Builder, which you find under the Reporting workspace. But when using that you will need a report model. A report model is a description of an underlying database that is used for building reports in Report Builder 1.0. For example in this post I use the ACS db (Audit Collection) report model to build custom ACS reports. In Ops Mgr there are report models for ACS, performance and event reports. But there are scenarios that you can´t solve with linked reports or SQL Report Builder, and then Visual Studio is a great tool to build reports with.

The first thing you need to do in Visual Studio when you start a new reporting project is to add a data source. A data source represents a connection to an external data source. The second thing is to add a report and a data set. A data set retrieves rows of data from a data source based on an SQL query. You can for example the query string below when working with performance reports. As you can see it looks for performance counters including Available MBytes in the name.

SELECT
vManagedEntityTypeImage.Image,
vPerfHourly.DateTime,
vPerfHourly.SampleCount,
vPerfHourly.AverageValue,
vPerfHourly.StandardDeviation,
vPerfHourly.MaxValue,
vManagedEntity.FullName,
vManagedEntity.Path,
vManagedEntity.Name,
vManagedEntity.DisplayName,
vManagedEntity.ManagedEntityDefaultName,
vPerformanceRuleInstance.InstanceName,
vPerformanceRule.ObjectName,
vPerformanceRule.CounterName
FROM
Perf.vPerfHourly INNER JOIN
vManagedEntity ON Perf.vPerfHourly.ManagedEntityRowId =
vManagedEntity.ManagedEntityRowId INNER JOIN
vManagedEntityType ON vManagedEntity.ManagedEntityTypeRowId =
vManagedEntityType.ManagedEntityTypeRowId LEFT OUTER JOIN
vManagedEntityTypeImage ON vManagedEntityType.ManagedEntityTypeRowId =
vManagedEntityTypeImage.ManagedEntityTypeRowId INNER JOIN
vPerformanceRuleInstance ON
vPerformanceRuleInstance.PerformanceRuleInstanceRowId =
Perf.vPerfHourly.PerformanceRuleInstanceRowId INNER JOIN
vPerformanceRule ON vPerformanceRuleInstance.RuleRowId =
vPerformanceRule.RuleRowId
WHERE
(vPerformanceRule.CounterName LIKE N’%Available MBytes%’)
ORDER BY vPerfHourly.DateTime

 There are a number of good query strings at this TechNet page. The next thing to do is to start designing your report. You can drag and drop report objects from the toolbox. Report items add data, structure, and formatting to a report and come in two varieties; data regions and independent items. A data region renders data from an underlying data set.Independent report items are items that are not associated with a data set, for example a line or a rectangle. If we continue with the available Mbytes example a chart would be a good start. By drag and dropping a chart from the toolbox and then fields from the dataset you can easily create a chart. But it is not that easy-to-read.


To make the report more precise we could start by adding a drop down menu to select which machine to look at performance data from. To do that we first need to create a new dataset. You can use the same SQL query as before, but in this dataset only

select DISTINCT vManagedEntity.Path

, as we only want machines in the drop down menu. Then go to the Report menu and select to add a report parameter. Select to create a report parameter with a query based value and then select your new dataset and the path field. Then you need to add this parameter to your first dataset, as you want to only see performance data for the selected machine. To do that add vManagedEntity.Path and your parameter to the SQL query.

(vPerformanceRule.CounterName LIKE N’%Available MBytes%’) AND (vManagedEntity.Path = @Server)

If we now preview the report there is a drop down menu with all machines where the chart only show data shows data related to the selected machine.

The next think would be to change the time range. You can do that with report parameters and then add them to your SQL query. If you want to add a dynamic time range, for example NOW minus 7 days you can use the DateAdd command in your SQL query.

If you then right-click the chart there are a number of settings, for example change the scale, change chart type, enable 3-D and add a title to the chart. Other things that you might want to add is a header and some text to your report, then a table with details about the data in the chart. You can drag and drop both text box and matrix from the toolbox.

 

When you are satisfied with your report you can right-click the report project (top left side of visual studio) and deploy the report to your reporting server.

Change Management in System Center Service Manager

I have been testing Change Management in System Center Service Manager beta 1.

ITIL defines the change management process this way:

The goal of the Change Management process is to ensure that standardized methods and procedures are used for efficient and prompt handling of all changes, in order to minimize the impact of change-related incidents upon service quality, and consequently improve the day-to-day operations of the organization.

Change management is responsible for managing change process involving:
* Hardware
* Communication equipement and software
* System Software
* All documentation and procedures associated with the running, support and maintenance of live systems

Source: en.wikipedia.org

System Center Service Manager has a connector to System Center Configuration Manager that synchronizes hardware information and other relevant information to Service Manager. When creating a change request it is possible to pick/select objects syncronized from Configuration Manager. For example if you want to create a change request, regarding a security group in Active Directory, then you can select the group from the list. You can also open the object direct from the change request form, that is a convenient method when you need to verify some information.

 
Another alternative to start a change request is to select a object and then click create change request from the task bar. Then related items are already filled in. In the example below we want to create a change request involving Vista Service Pack 2.

 

When creating a new change request there are a couple of templates delivered out of the box. It is possible to create your own templates with pre-defined attributes like area, priority, people to notify, risk level and impact.

On the Related Items tab, of the change request, the creator can add related items like objects from Configuration Manager, Active Directory, documents and files and other work items. Work items can be for example incidents that are related to this change request. 

When a change is submitted the creator can track the change request on then process tab.

 

When all activities are carried out and the change request is filled in you can close the change request from the console.

It is possible to configure notification to get notified when something is happening. For example if someone creates a new change request you want to send a notification to all change reviewers.

It is reasonably easy to configure change management templates and notifications based on them. But it is a number of steps to take and a name standard has never been more important. If you don’t have a good name standard you will lose yourself pretty quick. Something that I think most Operations Manager 2007 administrators recognize. There are a couple of notification scenarios where I could see a need of more detailed criteria parameters. But as this is Service Manager beta 1 I guess we will see a lot more features in later beta versions and the RTM version. I think that the biggest obstacle will not be to how to configure Service Manager but instead how to plan and design all your workflows within your organization before you can input them into Service Manager.

If you are interesting in change process flow there is a lot of good information here at TechNet.

Microsoft.MOM.UI.Console.exe /viewname

I have seen a  number of questions about open the Ops Mgr console with a definite view. If you want to do that you can run the Microsoft.MOM.UI.Console.exe command with the /viewname switch. To get the viewname you can follow some tips in this post or you can look in the management pack XML code.

If you for example export and look in the Microsoft.Windows.Server.Library MP you will see a line starting with <View ID=”Microsoft.Windows.Server.Computer.AlertsView”. To start the console with that view run:

Microsoft.MOM.UI.Console.exe /viewname:Microsoft.Windows.Server.Computer.AlertsView