24 Feb 2023 05:23 AM
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.
24 Feb 2023 03:25 PM - edited 24 Feb 2023 05:24 PM
Hello. In your case will be type(host).
type(service),detectedName("192.168.1.120:80") |
Result. Maybe will be useful some transformations like startsWith("name") or equals("name") - documenation here.
Regards,
Romanenkov Alex
24 Feb 2023 06:43 PM
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",
24 Feb 2023 07:09 PM
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~")
24 Feb 2023 07:21 PM
your welcome, for any attribute you can use only:
24 Feb 2023 07:27 PM
Can you try to reduce the scope using to or from relationships?
25 Feb 2023 12:22 PM - edited 25 Feb 2023 01:21 PM
Why you don't want use standart option without any troubles and want to achive same with entity selector?
For my host with name somewhereonmars
With entity selector works:
type(host),entityName.contains(where) |
This is not working:
type(host),detectedName.contains(where) |
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
25 Feb 2023 12:40 PM
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.
25 Feb 2023 01:25 PM - edited 25 Feb 2023 01:28 PM
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.