Dynatrace Connector — Prerequisites

Verify required services and generate a Dynatrace API access token before setup.

3 min read Updated SS

Follow the steps below before setting up the Dynatrace Connector.

  1. Ensure the following services are running:
    • Control Center (cc)
    • Redis microservice
    • Scheduler service
    • Percona
    • Rabbit MQ
  2. Create the account and application in Control Center before enrolling in the

    connector.​

  3. Generate an access token for the Dynatrace API.

    1. In the Dynatrace menu, select “Access Tokens.”
    2. Select Generate new token.
    3. Enter a name for your token.
    4. Select the scopes below for the token.
      • Dataexport.
      • Read entities.
      • Read metrics.
    5. Select Generate.
    6. Copy the generated token to the clipboard. Store the token in a password manager for future use.

  4. Gather Dynatrace environment details and validate access with API examples for

    entities, services, and management zones.​

  5. Validate the Topology chain, execute the following command:

    1. For Host:

      curl -X GET "https://<Dynatrace DNS>/api/v2/entities/<host id>" -H "accept: application/json;
      charset=utf-8" -H "Authorization: Api-Token {Enter the token generated form step 4}"
      
    2. For Service:

      curl -X GET "https://<Dynatrace DNS>/api/v2/entities/<service id>"  -H "accept: application/json;
      charset=utf-8" -H "Authorization: Api-Token {Enter the token generated form step 4}"
      
    3. For Instance:

      curl -X GET "https://<Dynatrace DNS>/api/v2/entities/<instance id>" -H "accept: application/json;
      charset=utf-8" -H "Authorization: Api-Token {Enter the token generated form step 4}"
      

      For Example: Check with any one of the curl requests from above (Host/Service/Instance).

      Input: Host

      curl -X GET "https://<Dynatrace DNS>/api/v2/entities/<host id>" -H "accept: application/json;
      charset=utf-8" -H "Authorization: Api-Token {Enter the token generated form step 4}"
      

      Output: Host

      [
      {
      "entityId": "HOST-A018DD25178A72A8",
      "displayName": "sapsrv-01",
      "discoveredName": "sapsrv-01",
      "firstSeenTimestamp": 1633408762045,
      "lastSeenTimestamp": 1633960296393,
      "tags": [],
      "fromRelationships": {},
      "toRelationships": {
      "isProcessOf": [
      "PROCESS_GROUP_INSTANCE-A04C640A9F34164A",
      "PROCESS_GROUP_INSTANCE-E0BE9530F2AA3104",
      "PROCESS_GROUP_INSTANCE-32A64DDB01151241",
      ],
      

      If the response is obtained for any of Host/Service/Instance, it ensures that, through the token, we can validate the topology chain.

  6. Validate the KPI chain, execute the following command:

    Note: Ensure to use any of the Host/Service/Instance values based on the requirements.

    curl -X GET " https:// <Dynatrace DNS>/api/v2/metrics/query?pageSize=1000&metricSelector= <Host
    metric>&resolution=1m&entitySelector=entityId(<Host entity>)&mzSelector=mzid(<management zone ID>)" -
    H "accept: application/json; charset=utf-8" -H "Authorization: Api-Token {Enter the token generated
    form step 4}"
    

    For example:

    curl -X GET
    "https://<tenant>.live.dynatrace.com/api/v2/metrics/query?pageSize=1000&metricSelector=builtin:host.d
    isk.free&resolution=1m&entitySelector=entityId(HOST-
    464321EF36A94577)&mzSelector=mzId(991371682806578231)"-H "accept: application/json; charset=utf-8" -H
    "Authorization: Api-Token {Enter the token generated form step 4}"
    

    Output:

    {
    "totalCount": 2,
    "nextPageKey": null,
    "resolution": "1m",
    "result": [
    {
    "metricId": "builtin:host.disk.free",
    "dataPointCountRatio": 0.000012,
    "dimensionCountRatio": 0.00002,
    "data": [
    {
    "dimensions": [
    "HOST-464321EF36A94577",
    "DISK-9BD35BB507AF37E6"
    ],
    "dimensionMap": {
    "dt.entity.disk": "DISK-9BD35BB507AF37E6",
    "dt.entity.host": "HOST-464321EF36A94577"
    },
    "timestamps": [1763615100000, 1763615160000],
    "values": [74.2688293457031, 74.2688293457031]
    }
    ]
    }
    ]
    }
    
  7. Validate the Transaction chain, execute the following command:

    Note: Ensure to use any of the Host/Service/Instance values based on the requirements.

    curl -X GET "
    https://<tenant>.live.dynatrace.com/api/v2/metrics/query?pageSize=1000&metricSelector=builtin:service
    .keyRequest.(response.time,count.total,errors.fourxx.count)&resolution=1m&mzSelector=mzId(<management
    zone ID>)" -H "accept: application/json; charset=utf-8" -H "Authorization: Api-Token {Enter the token
    generated form step 4}"
    

    For example:

    curl -X GET "
    https://<tenant>.live.dynatrace.com/api/v2/metrics/query?pageSize=1000&metricSelector=builtin:service
    .keyRequest.(response.time,count.total,errors.fourxx.count)&resolution=1m&mzSelector=mzId(99137168280
    6578231)"-H "accept: application/json; charset=utf-8" -H "Authorization: Api-Token {Enter the token
    generated form step 4}"
    

    Output:

    {
    "totalCount": 2,
    "nextPageKey": null,
    "resolution": "1m",
    "result": [
    {
    "metricId": "builtin:service.keyRequest.response.time",
    "dataPointCountRatio": 0.000024,
    "dimensionCountRatio": 0.00004,
    "data": [
    {
    "dimensions": [
    "SERVICE_METHOD-DAF5B1744250F8EC"
    ],
    "dimensionMap": {
    "dt.entity.service_method": "SERVICE_METHOD-DAF5B1744250F8EC"
    },
    "timestamps": [1763615220000, 1763615280000],
    "values": [3874.66666666667, 4530]
    }
    ]
    },
    {
    "metricId": "builtin:service.keyRequest.count.total",
    "dataPointCountRatio": 0.000024,
    "dimensionCountRatio": 0.00004,
    "data": [
    {
    "dimensions": [
    "SERVICE_METHOD-DAF5B1744250F8EC"
    ],
    "dimensionMap": {
    "dt.entity.service_method": "SERVICE_METHOD-DAF5B1744250F8EC"
    },
    "timestamps": [1763615220000, 1763615280000],
    "values": [3, 1]
    }
    ]
    },
    {
    "metricId": "builtin:service.keyRequest.errors.fourxx.count",
    "dataPointCountRatio": 0.000024,
    "dimensionCountRatio": 0.00004,
    "data": [
    {
    "dimensions": [
    "SERVICE_METHOD-DAF5B1744250F8EC"
    ],
    "dimensionMap": {
    "dt.entity.service_method": "SERVICE_METHOD-DAF5B1744250F8EC"
    },
    "timestamps": [1763615220000, 1763615280000],
    "values": [0, 0]
    }
    ]
    }
    ]
    }
    

  8. Validate the Events chain, execute the following command:

    Note: Ensure to use any of the Host/Service/Instance values based on the requirements.

    curl -X GET "
    https://<tenant>.live.dynatrace.com/api/v2/events?pageSize=1000&eventSelector=managementZoneId(<manag
    ement zone ID>)" -H "accept: application/json; charset=utf-8" -H "Authorization: Api-Token {Enter the
    token generated form step 4}"
    
    • * Multiple management zone IDs can be provided based on the requirement

      (management zone ID1, management zone ID2, etc).

      For example:

      curl -X GET "
      https://<tenant>.live.dynatrace.com/api/v2/events?pageSize=1000&eventSelector=managementZoneId(991371
      682806578231)"-H "accept: application/json; charset=utf-8" -H "Authorization: Api-Token {Enter the
      token generated form step 4}"
      

      Output:

      {
      "totalCount": 1,
      "pageSize": 1000,
      "events": [
      {
      "eventId": "3619426252375115466_1763462490716",
      "startTime": 1763462490716,
      "endTime": -1,
      "eventType": "AVAILABILITY_EVENT",
      "title": "Minimum process count not met for rule ProcessEnabled",
      "entityId": {
      "entityId": {
      "id": "HOST-464321EF36A94577",
      "type": "HOST"
      },
      "name": "192.0.2.135"
      },
      "properties": [
      {
      "key": "Event_source",
      "value": "Process availability"
      },
      {
      "key": "Message",
      "value": "Minimum process count not met for rule named ProcessEnabled"
      },
      {
      "key": "Process_instance_snapshots",
      "value": "generated"
      },
      {
      "key": "dt.entity.host",
      "value": "HOST-464321EF36A94577"
      

  9. Ensure the tables are available in the AppsOne DB.

    1845+Connector+framework+restructuring#Connector-Tables