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

Entity Selector

SureshThakur
Contributor

Hi,

Is there a way to use "detectedName" attribute in the entitySelector. I tried but only see entityName attribute available. We have custom naming rule setup for host so detected and display name are different. I need to set some tagging based on detected name through entitySelector.

8 REPLIES 8

Romanenkov_Al3x
DynaMight Champion
DynaMight Champion

Hello. In your case will be type(host).

type(service),detectedName("192.168.1.120:80")

 

Romanenkov_Al3x_0-1677252263228.png

Result. Maybe  will be useful some transformations like startsWith("name") or equals("name")  - documenation here.

Romanenkov_Al3x_1-1677252308918.png

 

 

Regards,

Romanenkov Alex

DT_NGINX_FORCE_UNKNOWN_VERSION_INSTRUMENTATION=1

DanielS
DynaMight Guru
DynaMight Guru

Hello @SureshThakur for type(HOST) you also have the following attributes available :

"additionalSystemInfo",
"autoInjection",
"awsNameTag",
"azureComputeModeName",
"azureEnvironment",
"azureHostNames",
"azureResourceGroupName",
"azureSiteNames",
"azureSku",
"azureVmScaleSetName",
"azureVmSizeLabel",
"azureZone",
"bitness",
"boshAvailabilityZone",
"boshDeploymentId",
"boshInstanceId",
"boshInstanceName",
"boshName",
"boshStemcellVersion",
"cloudPlatformVendorVersion",
"cloudType",
"conditionalName",
"cpuCores",
"customHostMetadata",
"customizedName",
"detectedName",
"gceHostName",
"gceInstanceId",
"gceInstanceName",
"gceMachineType",
"gceNumericProjectId",
"gceProjectId",
"gcePublicIpAddresses",
"gcpZone",
"hypervisorType",
"installerPotentialProblem",
"installerSupportAlert",
"installerTrackedDownload",
"installerVersion",
"ipAddress",
"isMonitoringCandidate",
"kubernetesLabels",
"logicalCpuCores",
"logicalCpus",
"macAddresses",
"memoryTotal",
"monitoringMode",
"networkZone",
"oneAgentCustomHostName",
"openstackAvZone",
"osArchitecture",
"osServices",
"osType",
"osVersion",
"paasMemoryLimit",
"paasVendorType",
"physicalMemory",
"simultaneousMultithreading",
"softwareTechnologies",
"standalone",
"standaloneSpecialAgentsOnly",
"state",
"virtualCpus",
"zosCPUModelNumber",
"zosCPUSerialNumber",
"zosLparName",
"zosSystemName",
"zosTotalGeneralPurposeProcessors",
"zosTotalPhysicalMemory",
"zosTotalZiipProcessors",
"zosVirtualization",

The true delight is in the finding out rather than in the knowing.

Thanks @DanielS , @Romanenkov_Al3x  for your response.

I need to find and some text in the detected name. I tried below but no luck

type(host),detectedName.contains(".domain.") , it throws an error Unknown predicate name detectedName.contains

 

However, the "contains" operator works with entityName 

type(host),entityName.contain(~"CF1~")

your welcome, for any attribute you can use only:

DanielS_0-1677266450716.png

 

The true delight is in the finding out rather than in the knowing.

Can you try to reduce the scope using to or from relationships?

The true delight is in the finding out rather than in the knowing.

Why you don't want use standart option without any troubles and want to achive same with entity selector?

Romanenkov_Al3x_0-1677327732249.png

For my host with name somewhereonmars

With entity selector works:

type(host),entityName.contains(where)

 

This is not working:

type(host),detectedName.contains(where)

Romanenkov_Al3x_1-1677328776754.png

You can define autotagins rules to get tags - for example domain - as detected name and then try with entity selector with tags.

Or create rule on based tags which you achive by first autotaging ruile.

UPD: But it will not works too, because tag have no modifications.

Unbelievable.

 

Regards,

Alex

DT_NGINX_FORCE_UNKNOWN_VERSION_INSTRUMENTATION=1

Hi,

Thanks again for your response. You are right standard option was always there.

Reason I want to use entitySelector is because my production environment host span across more than 30 domain in 5 different datacentre.

 

I want to create management zone for each data center to identify the entities of each datacentre and also limit the access to certain team.

If I use standard entity rule then I have to create more than 30 rules.

Therefore I was thinking to use entitySelector to limit the number of rule to only 5.

 

 


In this case the best solution in my opinion will be creating a custom Python script to get all hosts, do our work without any Dynatrace limitations and tag objects via API calls manually by script properly as "I WISH" not AS "Dynatrace ALLOW"

Unbelievable, but Dynatrace can't provide this minimal functions to do it out of the box. 

DT_NGINX_FORCE_UNKNOWN_VERSION_INSTRUMENTATION=1

Featured Posts