How SQL Monitor connects to monitored servers
Published 15 March 2023
SQL Monitor connects to monitored servers in different ways depending on the target operating system.
SQL Monitor connects to Windows machines and SQL Server instances using WMI and WMI Query Language (WQL), either over WinRM (http/https) or DCOM. When it uses WinRM, it requires SOAP over HTTPS for automation: when over DCOM, it uses RPC/TPC.
SQL Monitor connects to Linux machines using SSH.
The Base Monitor service then samples machine monitoring data, including virtual machine and virtual machine host metrics, via WMI or SSH as described above. This includes time series metrics for CPU, memory and disk usage, details of system processes and server properties and settings.
For SQL Server, SQL Monitor uses WMI to discover cluster nodes. It collects instance and database-level metrics, including time series counters, query information, wait statistics, backup details, and more, using a mixture of WMI, plus T-SQL queries that access various SQL Server Dynamic Management Views and system catalog views, tables and properties. It may also need to run DBCC commands, enable traces and so on.
For PostgreSQL, instance and database-level metrics are collected through SQL queries that access various statistical counters. It also uses extensions such as log_fdw or file_fdw to access instance log files.