SCOM Agent health via SQL Query

Howdy folks,

http://social.technet.microsoft.com/Forums/en-US/operationsmanagerreporting/thread/cac41c14-77ab-4f90-8f98-4fe158495c81

I used this previous post to get myself started - but don't believe I am on the right track for what I want.   While i've been working with SCOM for a little while now, I am still not that comfortable inside the DB --- which brings me here.

I am looking to create a simple dashboard webpage in IIS on a seperate machine.  This machine already hosts our internally developed inventory front-end.  At my last job, our SCOM admin developed something similar, and it was invaluable.  In short, I want to create a dashboard that queries the OperationsManager DB every minute or two for the last heartbeat time of an agent.  regardless of whether its managed or not, and regardless of whether its a gateway or not.  From there, let the page determine that its outside its 180 second timeout (ignoring the SCOM state of the agent effectively)

The above solution appears to give me the agent state, not the heartbeat time.  It also does not indicate when a gateway is offline, only agents.

The idea here is getting a raw dashboard of what agents are not responding in a timely fashion, and giving me the flexibility of coupling it with our internal inventory/CMDB solution to display unhealthy servers with useful information (such as location, application running on it, os version). 

at my last shop we had a solution that displayed this data, with links for automating setting it into MM, and making work log entries to our CMDB.  not sure i'll go that far - right now, just want a simple dashboard to tell me whats not happy at a basic level.

September 4th, 2012 1:37pm

to summarize - i'm looking to find out where i can query an agent name, along with its last heartbeat time --- real simple, i can do the rest from that... 
Free Windows Admin Tool Kit Click here and download it now
September 4th, 2012 4:36pm

Hi

The samples here might get you into the right direction http://blogs.technet.com/b/kevinholman/archive/2007/10/18/useful-operations-manager-2007-sql-queries.aspx

Stefan

September 5th, 2012 10:16am

I came across those samples already, and I used them to get started, however none of them reference the heartbeat timing itself.  the useful queries here still rely on Scom to determine the health of an agent, instead of giving me the raw data to determine heartbeat time myself.

i'm sure the method i a looking for, checking on the heartbeat time myself isn't necessarily the supported / proper method of getting health state, but again - this is just a simple, is the server online/heartbeating dashboard check.  we haveplenty of other checks/monitors/alerts that do far more --- this one is just intended to be a single pain of glass for our Ops guys...   gives them the ability to check a quick page that tells them what isn't heartbeating at all, and some correlating inventory information to add onto it...    such as lifecycle (is it a dev system?, infrastructure? ad? production? backups?)

onward i dig... thanks though... 

Free Windows Admin Tool Kit Click here and download it now
September 5th, 2012 2:41pm

As far as I know, SCOM does not store its last heartbeat time on DB.

Roger

June 20th, 2015 7:21am

Hello, did you ever get to achieve this data extract?
Free Windows Admin Tool Kit Click here and download it now
June 20th, 2015 8:40am

In SCOM 2012, the table is called State, you'll need to figure out the joins and so on to BaseManagedEntity so you can get servers or agents.
June 20th, 2015 3:53pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics