After Implementing CMG, configuration manager management point keeps the ability to allow both the Intranet and Internet traffic. If you have allowed the Internet traffic to your servers then you might be thinking about how many clients machines are approaching the servers through Internet traffic ( CMG )
All these possible by using the SQL query to mentioned below. If you have multi hierarchy infra then use this SQL query on top of the configuration that is CAS server.
select Name, SiteCode, ClientVersion, LastPolicyRequest, LastDDR as [Last Heartbeat],
LastHardwareScan, max(CNLastOnlinetime) as [Last Online Time],
max(CNLastOfflineTime) as [Last Offline Time], CNAccessMP as [Internet Access MP]
Where CNIsOnInternet =1
group by Name, SiteCode, ClientVersion, LastPolicyRequest, LastDDR,
LastHardwareScan, CNLastOnlinetime, CNLastOfflineTime, CNAccessMP
order by CNLastOnlineTime desc
SQL QUERY OUTPUT
The output of the query will be as below
Most important if you have multiple CMG gateway then in this report you can get the name of te Internet access MP In last column.