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

using startsWith in entity selector

leonatay
Guide

Hi community, 

 

I want to configure a tag that selects mssql db instance and EXCLUDES db instances from specific server instance beginning with certain alphabets (for custom alerting purposes). In attribute seems like there is no startswith() option. 

 

Have anyone have experience regarding this?

 

For now my entity selector looked like this:

type(dt.entity.sql:sql_server_database), not(Device("VCENxxx"))

which i keyed in the full name of the device.

 

Was wondering if I can have a startswith option.

 

leonatay_0-1668157871337.png

 

Thank you.

 

Sincerely,

Leona

 

1 REPLY 1

Ingrida
Mentor

Hi Leona, 

 

At least on our cluster (Dynatrace Managed, 1.248) we do not have entity type "dt.entity.sql:sql_server_database".  Are your sure you do?

 

We actually work quite a lot with entitySelector for Management Zone definition (f.e. include all queues or all databases which are related to services from this management zone) or for custom tagging (tag all services which run on process group with these tags and entity name which starts with this and contains that). And it works. Example:

 

 

type(SERVICE),serviceType(DATABASE_SERVICE),softwareTechnologies(MICROSOFT_SQL_SERVER),not(entityName.startsWith("EV"))

 

 

Asks all services which are MS SQL databases and name does not starts with EV. Output:

 

 

{
  "totalCount": 155,
  "pageSize": 200,
  "entities": [
    {
      "entityId": "SERVICE-076BDC9E1A05DB5A",
      "type": "SERVICE",
      "displayName": "SpiraTest",
      "properties": {
        "softwareTechnologies": [
          {
            "type": "MICROSOFT_SQL_SERVER"
          },
          {
            "type": "DOTNET",
            "edition": ".NET Framework",
            "version": "4.6.2.0"
          }
        ]
      }
    },
...

 

 

(we do not have mysql oon the system...)

 

Regards,

Ingrida

Featured Posts