APM Configured Endpoint Report
Published Feb 15 2019 03:28 PM 213 Views
First published on TECHNET on Aug 22, 2012

So... I was talking to my friend/colleague Eric in MSIT (Microsoft IT), who is one of our internal System Center power users, as you can imagine. MSIT manages thousands of line of business applications.
As APM gets rolled out to web farms, or new servers are added to the monitoring system, how do you keep track of what exactly are you monitoring?
Which applications, on which servers?

We have shown a number of times how easy it is to set up APM . But every page in the template can be scoped down to groups... you might have configured the same application for two different environments (i.e. Production and Staging) by using group scoping, right?
How do I know which app is configured for monitoring and on which machines, when I have hundreds of templates configured for hundred of application components/applications?

The UI has several views, divided by types (we have different object types that represent all these endpoints), but it is not always easy to see them all in one place .
This is a perfect scenario for custom report.
So, I wrote a query to pull these pieces together from OpsMgr Data Warehouse, and packaged that into a report.

The logic is the following:

  1. First of all, pull all the potential "endpoints": we have different types of objects that are potential candidates for APM monitoring and that are "seen" in the APM template: ASP.NET applications running on either IIS7 or IIS8 (in SP1), ASP.NET Web services, WCF services, Windows Services (in SP1)...

  2. Then we look at the objects that are created on an already-enabled application: these are only of two basic types: monitored web apps, or monitored windows service. These are the ones I talked about in this other blog post – look at the diagram showing “agent instances”

  3. Then i compare these two results - so I can pull together the information about which endpoint type we are actually monitoring, on which machine, and under which name the template represents it (with the added environment suffix) vs. the original name of the service or web application discovered by IIS MP.

There is quite a bit of string manipulation logic in the query to do the “match”, because all these pieces are really loosely-coupled, don’t always have the same properties and those properties don’t always/consistently have the same format. This is potentially fragile logic if MPs (and the way those properties are populated) change in the future, but for the limited testing I could do on my test environment, as well as on the MSIT environment, it appears to work (both on 2012 RTM and SP1 - English version... beware that, if you are using localized versions some class display name might be different...).

The report I produced looks like the following screenshot (from my TEST LAB, not MSIT's environment):

It shows which applications have been enabled on which machines, and what endpoint type they are, as well as both the “original” name of the endpoint in IIS (or windows service in SP1) and the name given in the configured template. It currently doesn't show Client-Side, just Server-Side data.

Both the SQL query used by the report and an MP that contains the report are attached to this post. They are meant to be used as a sample to get you started - if you are familiar with TSQL and you look at the query, it is heavily commented and should give you a feeling of what it is doing. You could even customize it to your needs and use it a starting points for additional scenarios (i.e. showing applications that are NOT configured, vs. the ones that are; or exposing additional info).

I hope it is useful!


This posting is provided "AS IS" with no warranties, and confers no rights. Use of included utilities are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm .


Version history
Last update:
‎Mar 11 2019 09:35 AM
Updated by: