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

How to select multiple entityName.startsWith statements?

larry_roberts
DynaMight Champion
DynaMight Champion

I am trying to make some of our rules more efficient and cut down on the amount of rules needed for auto tags. Does anyone know if it is possible to add an OR statement as part of the syntax below?

type(CONTAINER_GROUP),toRelationships.isInstanceOf(type(CONTAINER_GROUP_INSTANCE),fromRelationships.isCgiOfNamespace(type(CLOUD_APPLICATION_NAMESPACE),entityName.startsWith("example1")))

For example, I want to select multiple namespaces in this case, like:

example1 OR example 2 OR example 3 And so on.

Is that even possible using entityName.startsWith?

The following works as an OR but it is based on the ID of the namespace as to where I want to do the same but, by the namespace name instead which does not seem to work.

type(CONTAINER_GROUP),torelationships.isInstanceOf(type(CONTAINER_GROUP_INSTANCE),fromRelationships.isCgiOfNamespace(type(CLOUD_APPLICATION_NAMESPACE),entityId("CLOUD_APPLICATION_NAMESPACE-1234","CLOUD_APPLICATION_NAMESPACE-5678")))

Thanks!

2 REPLIES 2

Akhil-Jayendran
Advisor

Hello @larry_roberts ,

It seems that an OR condition is not supported with entityName.startsWith, as it does not accept multiple values. Therefore, using a call like entityName.startsWith("name", "name1", "etc") is not valid, I belive.
https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/entity-v...


I think it would be better to have DQL support for configuration auto-tagging, or some kind of auto-tagging app specifically for configurations. Not sure already there ?

Consultant | TEKsystems

Yeah seems to be what I am finding as well. It was worth the question 🙂

I did created an RFE on this.

Thanks!

Featured Posts