dmeyers-berkley

updated

14 years ago

0

140466

August 17th, 2012 13:00

Determine if host is virtual in groovy script

Hi,

I am writing a groovy script to pull some data from our SQL Server instances being monitored.  I would like to be able to differentiate b/w physical hosts and virtual hosts.  I know this must be possible since the database dashboard shows a different icon for the two.  However, I can find what data item or property I would look at to determine this.

db_hosts.png

I am using the following code:

dataSrv = server.DataService

querySvc = server.QueryService

topologyQuery = "!DBSS_Instance"

objects = querySvc.queryTopologyObjects(topologyQuery)

// Need a way to determine if each object is on a physical or virtual host

//...........

Thanks.