Forum Discussion

DanB's avatar
DanB
Icon for Advisor rankAdvisor
4 years ago

Categorizing different Citrix Box roles

So I was asked if we can include all the different Citrix box roles in our Dynamic Citrix Group which looks for any devices that has the Category with different Citrix property sources. 

For reference there are Citrix StoreFronts (SF) >> Deskstop Delivery Controlers (DDC) >> Provisioning Services Servers (PVS) >> XenApp Farm Servers

So for the PVS servers I did created a new Property Source entry and used Embedded Groovy Script and took the content from another PS and just modified the contains xxxx section: 

import com.santaba.agent.groovyapi.win32.WMI;
//==================================
def host = hostProps.get("system.hostname");
// get a list of running services
def service_list = WMI.queryAll(host, "select * from win32_service");
def datacoreServices = service_list.findAll
{ service ->
    service["DISPLAYNAME"].contains("Citrix PVS")
}
// Did we find any Citrix PVS Services?
if (datacoreServices.size() > 0)
{
    println "system.categories=CitrixPVS";
}
return(0);
//=== END ====

But in searching how to set this up I noticed that DataSources have a much simpler way to query boxes for properties.
Example there's a DS called:  WinCitrixServices-  that in its Active Discovery section we can define the Discovery Method, and the parameters can specify which WMI Class to look at and then easily specify the filter properties, etc..:

Why can't Property Sources have this same method to allow me to easily define the criteria I'm looking for? Why is it only groovy or powershell scripts?

Also with regards to the different Citrix box roles are there no PVS or StoreFront datasources ?