Hi,
I have been asked if it would be possible to display information about Availability Groups from DPA on a dashboard in Orion.
With the help of @kpmarcin we were able to reproduce the following information from DPA

as Custom Tables in Orion with the following result:

However we had to use some workarounds as there is no documentations regarding statuses
Sample query:
SELECT
--------------------------------------------------------------
--r.REPLICA_NAME AS [Node]
(concat('
') + ''+ r.REPLICA_NAME + '') AS [Node]
--------------------------------------------------------------
--,r.HEALTH AS [Health]
,CASE
when r.HEALTH = 2 then (concat('
','Up'))
when r.HEALTH = 1 then (concat('
','Down'))
else (concat('
','Unknown') + CAST(r.HEALTH as varchar(10)))
END AS [Health]
--------------------------------------------------------------
--,r.ROLE AS [Role]
,CASE
when r.ROLE = 1 then ('Primary')
when r.ROLE = 2 then ('Secondary')
else ('Unknown' + CAST(r.ROLE as varchar(10)))
END AS [Role]
--------------------------------------------------------------
--,r.AVAILABILITY_MODE AS [Availability Mode]
,CASE
when r.AVAILABILITY_MODE = 0 then ('Asynchronous')
when r.AVAILABILITY_MODE = 1 then ('Synchronous')
else ('Unknown' + CAST(r.AVAILABILITY_MODE as varchar(10)))
END AS [Availability Mode]
--------------------------------------------------------------
--,r.FAILOVER_MODE AS [Failover Mode]
,CASE
when r.FAILOVER_MODE = 0 then ('Automatic')
when r.FAILOVER_MODE = 1 then ('Manual')
else ('Unknown - ' + CAST(r.FAILOVER_MODE as varchar(10)))
END AS [Failover Mode]
--------------------------------------------------------------
--,r.CONN_STATUS AS [Connection Status]
,CASE
when r.CONN_STATUS = 1 then (concat('
','Up'))
when r.CONN_STATUS = 2 then (concat('
','Down'))
else (concat('
','Unknown - ' + CAST(r.CONN_STATUS as varchar(10))))
END AS [Connection Status]
--------------------------------------------------------------
FROM [dpa_repository].[ignite].[CON_AG_REPLICA] r
JOIN [SolarWindsOrion].[dbo].[Nodes] AS n ON r.REPLICA_NAME = n.Caption
--WHERE r.REPLICA_NAME = 'XXX' OR r.REPLICA_NAME = 'XXXX'
ORDER BY r.REPLICA_NAME
So my question is if its possible to get our hands on any kind of documentation regarding the status codes for DPA or maybe there is an easier way to do it 
@KMSigma.SWI