06 Aug 2025 09:44 AM
Hello.
I want to create a management zone for my Windows hosts which shows only active Windows hosts (there are connected Linux hosts, but I don't want showing Linux hosts only Windows hosts), active processes, active services and active applications. How can I write an entitySelector for this task? And where I can find entitySelector syntax tutorial, examples or full documentation about entitySelector?
Regards,
Huseyn N.
Solved! Go to Solution.
06 Aug 2025 10:17 AM
Hi,
I would say using automatic tagging rules for "mark" those hosts, processes, services, etc...
And later, create a management zone filtering by that tag.
Best regards
06 Aug 2025 11:31 AM
I did it. I created a management zone but i didn't apply filter to only active service, processes or hosts. I wrote these entitySelectors:
For Applications:
type("APPLICATION"),fromRelationship.calls(type("SERVICE"),fromRelationship.runsOnHost(type("HOST"),osType("WINDOWS")))
For Services:
type("SERVICE"),fromRelationship.runsOnHost(type("host"),osType("WINDOWS"))
For Processes:
type("PROCESS_GROUP_INSTANCE"),fromRelationships.isProcessOf(type("HOST"),osType("WINDOWS"))
For Hosts:
type("HOST"), osType("WINDOWS")
But these shows active and inactive everything. I want to show only active things.
How can I write entitySelector as I want?
06 Aug 2025 03:13 PM
@HuseynNajafliYou cannot select just active entities with entitySelector. Other APIs or functionality which uses Entity Selector does that. You can only filter on firstSeenTms, unfortunately, not on the lastSeenTms.
Docs for entity selector are here: https://docs.dynatrace.com/docs/shortlink/api-entities-v2-selector