What SQL query is being used in the Donuts Dashboard?

Hi,

I see that my last question was a little ambiguous. What i meant was that I want to use the Donuts dashboard to show the Number of servers that have breached a Warning/Critical Threshold for Disk monitor.
To be clear, i am not looking for performance data for the disks.
Just to show that there are servers breaching disks thresholds or Number of servers that have gone off line etc.
I have managed to get these to show up on the Donuts dashboard by not entering anything in the Group and Class, see the image below.

My question here is…what Table is this query running against?
What is the query being used here in this example?
How do i write a proper SQL query in the SQL Mgmt Studio to get this same Data to show up?

I have used this query in the Donuts dashboard, “Name LIKE ‘%Logical Disk Free Space%”,

I believe this is the WHERE statement.

What do i need to put in the SELECT statement and the rest of the query and target which table in the DB?

Assuming this is the Alert donut (rather than Status donut)…

SquaredUp accesses the SDK for alerting information. The “query” is actually more like this in PowerShell:

get-scomalert | where {$_.DisplayName -like “%Logical Disk Free Space%”}

What table is this being run against?

Similarly to the SCOM console, this is gained from the OperationsManager database and the table is likely dbo.Alert.

SELECT *
FROM [OperationsManager].[dbo].[Alert]
WHERE AlertName LIKE '%Logical Disk Free Space%'

As the default tile configuration has things like Timeframe and Filters, there will be more to add in the Where clause.

Thanks Jelly.

I am playing with this now but I will come back with more questions i am sure.

Regards
SR