cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Filter only active hosts, processes, services and applications using entitySelector

HuseynNajafli
Contributor

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.

3 REPLIES 3

AntonPineiro
DynaMight Guru
DynaMight Guru

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

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

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?

@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

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Featured Posts