Archive

Archive for June, 2013

Creating a map with server locations in OpsMgr 2012

June 15, 2013 Leave a comment

 

There are two new dashboards which use the new SCOMLocation information to provide information for Web Application Availability Monitoring.

Summary Dashboard – Map: This dashboard (and the Detailed Dashboard – List) are available when Web Application Availability Monitoring synthetic transactions have been created in the authoring pane. These dashboards are available in the Monitoring pane under Application Monitoring / Web Application Availability Monitoring / Test State by highlighting a synthetic transaction navigating to the Detailed Dashboard – Map option. This dashboard displays a map dashboard for the items which were highlighted when the task was run. Locations can be set for objects in OpsMgr 2012 using the New-SCOMLocation (which requires the display name, latitude and longitude) and Set-SCOMLocation PowerShell scripts. There are a variety of websites which can provide locations for various cities including http://www.timegenie.com/latitude_and_longitude/.

Detailed Dashboard – List: This dashboard displays a variety of information including the test status, total transaction time, time to first byte, content time, dns resolution time, time to last byte and content size for the Web Application Availability Monitoring synthetic transactions which were highlighted when this dashboard was navigated to.

PowerShell scripts related to location:

PowerShell scripts are used to work with the SCOMLocation information as shown below:

WLW-Creating-a-map-with-server-locations-in-_12E2F-image_2

 

Script name                           Synopsis:

Get-SCOMLocation            Gets a location.

New-SCOMLocation          Creates a location to which you can assign agents.

Remove-SCOMLocation     Removes a location.

Set-SCOMLocation             Associates one or more agents with a location.

Update-SCOMLocation       Updates the settings of a geographic location instance.

 

To configure the location for an agent we can perform the steps shown below: (to define the location, to define the agent and then to assign the location to the agent)

WLW-Creating-a-map-with-server-locations-in-_12E2F-PowerShell%20to%20set%20location

How to remove duplicate or non-required location information? Avoid running this script multiple times as I have yet to find an easy way to remove a location once it has been defined.  Marnix Wolf has written a blog article on this topic available (and other good tips on web application availability monitoring at): http://thoughtsonopsmgr.blogspot.com/2012/06/om12-how-to-remove-location-association.html

 

To create locations and assign latitude and longitude:

As an example, the first script below creates the locations and assigns them to latitude and longitude locations:

New-SCOMLocation –DisplayName “Austin” –Latitude 32.85 –Longitude -96.85

New-SCOMLocation –DisplayName “Tampa” –Latitude 27.9667 –Longitude -82.5333

New-SCOMLocation –DisplayName “Denver” –Latitude 39.75 –Longitude -104.867

New-SCOMLocation –DisplayName “Phoenix” –Latitude 33.4333 –Longitude -112.017

New-SCOMLocation –DisplayName “Washington” –Latitude 38.8900 –Longitude -77.03

To assign locations to agents:

The next script assigns the locations to the agents:

$Location = Get-SCOMLocation -DisplayName “Austin”      $Agent = Get-SCOMAgent -Name “cloud-AC01.cloud.pvt”       set-SCOMLocation -Location $Location -Agent $Agent

    $Location = Get-SCOMLocation -DisplayName “Tampa”      $Agent = Get-SCOMAgent -Name “cloud-SP01.cloud.pvt”       set-SCOMLocation -Location $Location -Agent $Agent       $Location = Get-SCOMLocation -DisplayName “Denver”       $Agent = Get-SCOMAgent -Name “cloud-DB01.cloud.pvt”       set-SCOMLocation -Location $Location -Agent $Agent

$Location = Get-SCOMLocation -DisplayName “Washington”    $Agent = Get-SCOMAgent -Name “cloud-DB04.cloud.pvt”     set-SCOMLocation -Location $Location -Agent $Agent

$Location = Get-SCOMLocation -DisplayName “Phoenix”      $Agent = Get-SCOMAgent -Name “cloud-DB2.cloud.pvt”       set-SCOMLocation -Location $Location -Agent $Agent

[Note: Be very careful when cut and pasting in samples for creation of locations, an incorrect dash can be misinterpreted as the positive value instead of the negative and put your location on the other side of the world! (yes, it happened to me a couple of times writing this blog post)]

Using agents with locations assigned:

Now that agents are assigned, we can use these agents as part of the Web Application Availability Monitoring synthetic transaction. To do this use the Add Monitoring Wizard

WLW-Creating-a-map-with-server-locations-in-_12E2F-image_10

Displaying the Summary Dashboard – Map:

From the Monitoring pane, open the Application Monitoring, Web Application Availability Monitoring, Test State and highlight the new Web Application Availability monitor which was defined.

WLW-Creating-a-map-with-server-locations-in-_12E2F-image_6

 

 

 

Displaying the Detailed Dashboard – List:

 

From the Monitoring pane, open the Application Monitoring, Web Application Availability Monitoring, Test State and highlight the new Web Application Availability monitor which was defined.

 

By highlighting a synthetic transaction we can navigate to the Detailed Dashboard – List and see the systems which were identified to a location and their health state details as shown below!

WLW-Creating-a-map-with-server-locations-in-_12E2F-image_17

Additional resources:

For further details on Web Application Availability Monitoring synthetic transactions on these dashboards see

 

Advertisements