Get disk space data monitored by SCOM

Noah-2518 100 Reputation points
2023-03-31T13:06:30.55+00:00

I consider letting third-party tools get the required data directly from the SCOM database.

e.g. disk space data.

Operations Manager
Operations Manager
A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.
1,409 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. XinGuo-MSFT 13,701 Reputation points
    2023-04-03T08:38:03.8666667+00:00

    Hi,

    I found the nearest query for your reference.

    use OperationsManagerDW
    
    select
    vManagedEntity.Path
    ,Perf.vPerfdaily.DateTime
    ,Perf.vPerfdaily.SampleCount
    ,vPerformanceRule.ObjectName
    ,vPerformanceRule.CounterName
    ,vManagedEntity.Name
    ,Perf.vPerfdaily.Averagevalue
    ,Perf.vPerfdaily.MinValue
    ,Perf.vPerfdaily.MaxValue
    ,vRule.RuleDefaultName 
    
    from Perf.vPerfDaily
    join vPerformanceRuleInstance on vPerformanceRuleInstance.PerformanceRuleInstanceRowid=Perf.vPerfDaily.PerformanceRuleInstanceRowid
    
    join vPerformanceRule on vPerformanceRule.RuleRowId=vPerformanceRuleInstance.RuleRowId
    join vManagedEntity on vManagedEntity.ManagedEntityRowid=Perf.vPerfDaily.ManagedEntityRowId
    join vRule on vRule.RuleRowId=vPerformanceRuleInstance.RuleRowId
    
    where vPerformanceRule.ObjectName='LogicalDisk'
    
    Order by Path,Name
    
    
    0 comments No comments

  2. SChalakov 10,261 Reputation points MVP
    2023-04-05T08:28:35.75+00:00

    Hi, there is this blog articles from Kevin Holman with some useful SCOM SQL queries: SCOM SQL queries

    Besides the example Xin Guo posted, you can also use this:

    --To retrieve all performance data for a given rule in a readable format use the following query: (change the r.RuleName value – get list from Rules Table)
    SELECT bme.Path, pc.ObjectName, pc.CounterName, ps.PerfmonInstanceName, pdav.SampleValue, pdav.TimeSampled 
    FROM PerformanceDataAllView AS pdav with (NOLOCK) 
    INNER JOIN PerformanceSource ps on pdav.PerformanceSourceInternalId = ps.PerformanceSourceInternalId 
    INNER JOIN PerformanceCounter pc on ps.PerformanceCounterId = pc.PerformanceCounterId 
    INNER JOIN Rules r on ps.RuleId = r.RuleId 
    INNER JOIN BaseManagedEntity bme on ps.BaseManagedEntityID = bme.BaseManagedEntityID 
    WHERE r.RuleName = 'Microsoft.Windows.Server.6.2.LogicalDisk.FreeSpace.Collection' 
    GROUP BY PerfmonInstanceName, ObjectName, CounterName, SampleValue, TimeSampled, bme.path 
    ORDER BY bme.path, PerfmonInstanceName, TimeSampled
    

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
    Regards
    Stoyan Chalakov