Discussion:
heartbeat report
(too old to reply)
Ziemek Borowski
2009-04-20 18:55:41 UTC
Permalink
Hi,

I need to select to external web page (It rather cannot be not embeded Web Console or sth) information about last contact with agents.
As always - I hate touch (potential ofen) OperationsManager DB, I rather prefer search in OperationsManagerDW.

Simplest metod is show last collected performance counter:
use OperationsManagerDW

SELECT vME.Path,max([DateTime]) as LastPerf

FROM [OperationsManagerDW].[Perf].[vPerfRaw] as vPerf with (nolock),

[OperationsManagerDW].[dbo].vManagedEntity as vME with (nolock) where vME.ManagedEntityRowId=vPerf.ManagedEntityRowId

and vME.ManagedEntityRowId in

(SELECT ManagedEntityRowId

FROM vManagedEntity with (nolock)

WHERE (ManagedEntityTypeRowId IN

(SELECT ManagedEntityTypeRowId

FROM vManagedEntityType as vMET with (nolock)

WHERE (vMET.ManagedEntityTypeSystemName = 'Microsoft.Windows.OperatingSystem')))) group by vME.Path order by LastPerf desc

But maybe I to it wrong way, and there is simple metod (ie. based on last heartbeats like in MOM 2005).
Or should I OperationsManager DB and query like that :
use OperationsManagerDW
SELECT
[DisplayName]
,[StateLastModified]
,[IsAvailable]
,[AvailabilityLastModified]
FROM [OperationsManager].[dbo].[ManagedEntityGenericView] where [MonitoringClassId] in
(SELECT [Id] FROM [OperationsManager].[dbo].[ManagedTypeView] where [Name] = 'Microsoft.Windows.Computer') order by DisplayName
(but AvailabilityLastModified contains information about change availability, not last working contact with agent).

Any ideas?

Request is simple: visualize if evey agents works properly, on indenpendent system, outside of OpsMgr, in "realtime".
--
Regards,

Ziemek Borowski http://ziembor.pl/
Vitaly Filimonov [MSFT]
2009-05-17 18:32:29 UTC
Permalink
What if you try to solve "the opposite" problem - visualize all agents that are not hearbeating? You can query that out of DW with the following T-SQL:

select *
from vHealthServiceOutage hso
where EndDateTime IS NULL
and exists (select *
from vManagedEntityManagementGroup memg
where (memg.ManagedEntityRowId = hso.ManagedEntityRowId)
and (ToDateTime IS NULL)
)
and ReasonCode in (0, 1)

Would that work for you?
--
-------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"Ziemek Borowski" <***@ziembor.pl> wrote in message news:986E89D2-C946-441E-9AE3-***@microsoft.com...
Hi,

I need to select to external web page (It rather cannot be not embeded Web Console or sth) information about last contact with agents.
As always - I hate touch (potential ofen) OperationsManager DB, I rather prefer search in OperationsManagerDW.

Simplest metod is show last collected performance counter:
use OperationsManagerDW

SELECT vME.Path,max([DateTime]) as LastPerf

FROM [OperationsManagerDW].[Perf].[vPerfRaw] as vPerf with (nolock),

[OperationsManagerDW].[dbo].vManagedEntity as vME with (nolock) where vME.ManagedEntityRowId=vPerf.ManagedEntityRowId

and vME.ManagedEntityRowId in

(SELECT ManagedEntityRowId

FROM vManagedEntity with (nolock)

WHERE (ManagedEntityTypeRowId IN

(SELECT ManagedEntityTypeRowId

FROM vManagedEntityType as vMET with (nolock)

WHERE (vMET.ManagedEntityTypeSystemName = 'Microsoft.Windows.OperatingSystem')))) group by vME.Path order by LastPerf desc

But maybe I to it wrong way, and there is simple metod (ie. based on last heartbeats like in MOM 2005).
Or should I OperationsManager DB and query like that :
use OperationsManagerDW
SELECT
[DisplayName]
,[StateLastModified]
,[IsAvailable]
,[AvailabilityLastModified]
FROM [OperationsManager].[dbo].[ManagedEntityGenericView] where [MonitoringClassId] in
(SELECT [Id] FROM [OperationsManager].[dbo].[ManagedTypeView] where [Name] = 'Microsoft.Windows.Computer') order by DisplayName
(but AvailabilityLastModified contains information about change availability, not last working contact with agent).

Any ideas?

Request is simple: visualize if evey agents works properly, on indenpendent system, outside of OpsMgr, in "realtime".



--
Regards,

Ziemek Borowski http://ziembor.pl/
Continue reading on narkive:
Loading...