Kevin Holman's System Center Blog

Posts in this blog are provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified in the Terms of UseAre you interested in having a dedicated engineer that will be your Mic

Agent Proxy alerts - finding the right machine to enable agent proxy on using a custom report

Agent Proxy alerts - finding the right machine to enable agent proxy on using a custom report

  • Comments 11
  • Likes

Certain types of agents need the agent proxy setting enabled.  These are documented in various guides... such as Exchange Active Directory, Cluster nodes, etc...

However, sometimes, we still get alerts that Agent Proxy needs to be enabled for a HealthService.  The problem is... the Alert often doesn't tell us which agent needs this enabled!!!

Here is an example alert:

 

image

 

The alert context tab is telling us about something called "SQLCLUSTER".... but I know that is a virtual cluster instance name... not the name of a real agent.

 

image

 

Marius blogged about a SQL query... that will help us find the agent that needs this turned on:

http://blogs.msdn.com/mariussutara/archive/2007/11/09/agent-proxying-alert.aspx

 

The sql query I like to use is:

select DisplayName, Path, basemanagedentityid from basemanagedentity where basemanagedentityid = 'guid'

Where "guid" = the GUID of the healthservice in the alert.

 

So in my example above - the part in bold is the GUID we need.....  the HealthService that is causing the problem....

Health service ( 4F6BCCD4-2A41-1C39-DC50-5CE6CA10E0D3 ) should not generate data about this managed object ( A6D9CC33-3EF7-00BF-3E78-B368B32F1486 ).

If we drop this into the query.... it will look like so:

select DisplayName, Path, basemanagedentityid from basemanagedentity where basemanagedentityid = '4F6BCCD4-2A41-1C39-DC50-5CE6CA10E0D3'

Which when run in a SQL query returns:

 

DisplayName    Path    basemanagedentityid
sqlnode2.opsmgr.net sqlnode2.opsmgr.net 4F6BCCD4-2A41-1C39-DC50-5CE6CA10E0D3

 

Aha!  So - SQLNODE2 needs agent proxy enabled.

Well.... how instead of all this dropping to SQL.... we create a report with the query above, and have an input parameter where you can just paste in the GUID from the alert?  I have created just that, and you can download it below!

Please see my previous post on creating a data source for the OpsDB here:  Creating a new data source for reporting against the Operational Database  You will need to do that first in order to see this report.... since it runs against the Operational Database, not the Data Warehouse.

Simply download this RDL file, then browse to your reporting website (http://reportingservername/reports) browse to your new custom folder for reports, and choose "Upload File".  Your new report is uploaded, and you should be able to see it in the Ops Console under Reporting now:

 

image

 

Open the report.  The report just needs you to paste in the healthservice GUID you saw in the Agent Proxy alert:

 

image

 

This should make it a bit easier and faster to tackle these types of alerts in the future.... for the few agents you are missing this setting on.

 

 

A simpler way to do this without running a report.... is to use "Discovered Inventory" in the monitoring console.

 

image

 

Select "Change Target Type" from the actions pane, and then choose "View All Targets" and then type "Health Service Watcher" in the "Look For" box.  Select the Health Service Watcher Class and click OK.

 

image

 

Now paste your GUID into the "FIND" box and click OK.  Make sure you dont have any trainling spaces in the GUID:

 

image

 

 

 

The Report download is here:

Attachment: HealthService_Agent_Proxy_GUID_report.rdl
Comments
  • Hi Kevin,

    i created the DataSource and uploaded the .rdl file, but the report is not working.

    I get an error that the data source can not be connected.

    Reading your intructions i thougt this would be very easy to install, but obviously it´s not :-)

    Can you tell me how to troubleshoot the report?

    thanks in advance

    Olaf

  • An easier way to do this in the console is to goto:

    Monitoring --> Discovered Inventory

    Change the class type to Health Service Watcher, and then search for the GUID that is provided in the Alert.

  • To troubleshoot getting the report to run... simply click properties on the report, and click "Data Sources".  Make sure it is linked to your Shared Data Source called "OpsDB".  Blick browse and link it if not.  Make sure you hit apply at the bottom or it wont save it.  Then run it.  If you get an error caused by the data source, then there is something mistyped in your connection string.... either the name of the database server (make sure to include instance if a cluster or named instance) and the name of the database.

  • Thanks Richard!  You are right - I will update the post.

  • ACTUALLY, the easiest way is this function:

    function Get-AgentByHSID ([guid]$hsid, [string]$omdbserver)

    {

    (Get-MonitoringObject -id $hsid ).DisplayName

    }

  • Surely, by now we are all familiar with this alert. Agent proxying needs to be enabled for a health service

  • Hi Kevin

    I rebuilt my OpsMgr sp1 environment from a single MS 32-bit environment to a dual MS (non-clustered) 64-bit environment. My problem is the GUID to enable agent proxy keeps coming up with my RMS server. My question is this actually possible and if so is it safe to enable proxy on the RMS?

    Thanks again

    Mark

  • Yes - I commonly enable agent proxy on the RMS and MS.  I dont know of any reason not to do that.

  • Find Agent, by Health Service Id

    get-agent | where {$_.hostedHealthService.id -eq "guid"} | select-object name

  • For SCOM 2012

    get-SCOMagent | where {$_.hostedHealthService.id -eq "guid"} | select-object name

  • For SCOM 2012

    Get-SCOMMonitoringObject -id

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
Search Blogs