Configure Service Graph Connector for Observability - Dynatrace using guided setup
Use the Service Graph Connector for Observability - Dynatrace to ingest Configuration Management Database (CMDB) data from Dynatrace using REST APIs. This connector is the second generation of the Service Graph Connector for Observability - Dynatrace application developed by ServiceNow.
Vorbereitungen
To use this Service Graph Connector, you need a subscription to a Subscription Unit that is based in the IT Operations Management (ITOM) Visibility application or in the ITOM Discovery application. As defined in the section titled "Managed IT Resource Types" in ServiceNow Subscription Unit Overview for your subscription, for managed IT resources that are created or modified in the CMDB by this Service Graph Connector, but that aren’t yet managed by ITOM Visibility or ITOM Discovery, these resources will increase Subscription Unit consumption from that application. Review your current Subscription Unit consumption within ITOM Visibility or ITOM Discovery to ensure available capacity.
- The Integration Commons for CMDB store app, which is automatically installed.
- The CMDB CI class models store app, which is automatically installed. See CMDB CI Class Models app.
- The ITOM Discovery License plugin (com.snc.itom.discovery.license). You must activate this plugin.
- ITOM Licensing plugin (com.snc.itom.license). For more information, see Request Discovery.
- The Datastream Action plugin (com.glide.hub.action_type.datastream), which is automatically installed.
- The Observability Commons for CMDB (sn_observability) plugin, which is only required for event ingestion and must be installed before installing the connector for Event Management to work. For more information, see Observability Commons for CMDB on the ServiceNow Store. is automatically installed.
Role required: admin
Prozedur
- Navigate to All > SG Connector for Observability Dynatrace > Setup.
- Navigate to All > Service Graph Connectors > Dynatrace Observability > Setup.
- On the Getting started page, select Get Started.
-
Set impact values for clusters and have the connector get access to the SNC.ImpactManager API.
Hinweis:This step appears when Observability Commons is installed.
- On the Setup page, in the Enable Access To SNC.Impact Manager section, select the Copy Script to Global Scope task.
-
In the Copy Script to Global Scope section, copy the script.
- Select Configure.
- Switch to the global scope.
- Select the Additional actions icon (
).
- Select Insert and Stay.
- Select Mark as Complete.
-
In the Verify script is copied properly section, verify the script.
- Select Configure.
- Select the EvtMgmtImpactManagerMediator script and verify it was copied to the global scope.
- In the Accessible from field, ensure it is set to All application scopes.
- Select Mark as Complete.
-
Configure the basic setup.
- On the Setup page, in the Basic section, select the Configure Auth Token for Dynatrace task.
-
On the next page, in the Configure Auth Token for Dynatrace section, configure the authentication token.
- Select Configure.
- In the API Key field, enter api-token <your api token>.
For example, api-token mytokenid.
- Select Mark as Complete.
-
In the Configure HTTP Connection for Dynatrace section, configure the HTTP connection.
- Select Configure.
- Update the Host field with a fully qualified hostname for your Dynatrace instance.
For example, abc123.live.dynatrace.com.
The hostname is automatically filled in the Connection URL field.
- Enable the use of a MID Server, select the Use MID Server check box.Hinweis:The HTTP connection will be pre-configured to use the API key that was configured during the previous setup task.
- Select Mark as Complete.
-
Test the HTTP connection.
- In the Test Connection section, select Configure.
- To test the connection configuration, select Test Connection.Hinweis:If any of the tests have errors, follow the suggestions for remediation.
- Set the Test Connection task to complete by selecting Mark as Complete.
-
In the Create Default Notification Payload Template section, select Configure.
Hinweis:You need an access token with the following scopes:
- Read configuration (ReadConfig)
- Write configuration (WriteConfig)
- Read log content (LogExport)
- Read metrics (metrics.read)
- Read settings (settings.read)
- Write settings (settings.write)
- Read logs (logs.read)
- Update the name of the payload template, if needed.
- Select Problem Notification Setup.
- Set the Create Default Notification Payload Template task to complete by selecting Mark as Complete.
- Wahlweise:
If you want to support multiple instances, in the Upgrade Source Native Keys section, select Configure.
- In the Run script text box of the background
script page, enter the following
script:
var gr = new GlideRecord("sys_object_source"); gr.addQuery("name", "SGO-Dynatrace"); var grOR = gr.addQuery("id", "STARTSWITH", "HOST-"); grOR.addOrCondition("id", "STARTSWITH", "PROCESS_GROUP_INSTANCE-"); grOR.addOrCondition("id", "STARTSWITH", "PROCESS_GROUP-"); grOR.addOrCondition("id", "STARTSWITH", "SERVICE-"); grOR.addOrCondition("id", "STARTSWITH", "APPLICATION-"); gr.query(); while (gr.next()) { gr.setValue("id", "f379137e075820107add6a77c4a93538|||" + gr.getValue("id")); gr.update(); } - Select Run Script to run the background script in
the global scope.
The script may take several minutes to execute.
- After the script is executed, select Close.
- From the application picker, select the Service Graph Connector for Observability Dynatrace application.
- Select Mark as Complete.
- In the Run script text box of the background
script page, enter the following
script:
-
For a Grail-enabled tenant, configure the OAuth 2.0 client credentials and test the connection.
For more information on Dynatrace OAuth credentials, see Authentication for the Account Management API on the Dynatrace documentation site.
-
Set the Dynatrace Grail status to indicate whether using the Grail-enabled tenant.
Hinweis:
You can check Grail enablement by contacting your Dynatrace administrator.
- In the Configure Dynatrace Grail OAuth section of the Service Graph Connector for Observability Dynatrace Setup page, select Get Started.
- For the Set Dynatrace Grail status task, select Configure and review or modify the property settings for a Grail-enabled tenant.
- If you've Grail-enabled tenant, set the Value field of the grailEnabled property to true.
Else, leave the value set to false.
- Set the Configure Dynatrace Grail OAuth task to complete by selecting Mark as Complete.
-
Add a new OAuth connection.
Hinweis:You need an OAuth token with the following scope permissions in Grail:
- storage:logs:read
- storage:buckets:read
- In the Configure OAuth credentials section, select Configure.
- On the Workflow Studio page that opens in a new browser tab, select Add Connection.
- Enter a name, the connection URL, OAuth client ID, and OAuth client secret details.
- Select Create and Get OAuth Token.
- Return to the guided setup page.
- Set the Configure OAuth credentials task to complete by selecting Mark as Complete.
-
Test the new OAuth connection.
- In the Test Connection section, select Configure.
- To test the connection configuration, select Test Connection.
- When the Status field is set to Success, select Update to close the Test the connection dialog box and return to the guided setup page.
If any of the tests have errors, follow the suggestions for remediation.
- Set the Test Connection task to complete by selecting Mark as Complete.
-
Set the Dynatrace Grail status to indicate whether using the Grail-enabled tenant.
-
Set up the additional configurations.
- On the Guided setup page, in the Advanced section, select the Advanced settings task.
-
In the Advanced Settings section, select Configure and review or modify the existing settings for a custom configuration.
You can configure the following settings:
- Review the page size used in REST API requests to fetch Dynatrace entities.
- Define number of days a configuration item (CI) can be inactive before it is ignored.
- Enter the percentage of an application cluster's nodes that need to be in a state to raise that state to its parent in the service map.
For example, you can define the percentage of nodes that need to go critical for the parent of a cluster to be in a critical state. If there are 10 nodes in a cluster, setting the property value to
70would require at least 7 out of the 10 nodes in the cluster to go into a critical state to reflect up to the parent service of the cluster. - Enable ingesting events that do not have a matching CI in the CMDB.
- Enable populating the Application (cmdb_ci_appl) CIs from Dynatrace (Dynatrace processes) during scheduled imports.
- Select Save.
- Select Mark as Complete for the Advanced Settings task.
-
Configure connection properties for the Dynatrace connection.
- In the Configure Instance Settings section, select Configure.
- In the Service Graph Connection Properties related list, configure the properties of the connection record.
Tabelle : 1. Dynatrace connection properties Property Description managementZoneNames Enter the name of the management zone to fetch from your Dynatrace environment. For multiple entries, separate the zone names with commas. tags Enter the name of the tags to fetch from your Dynatrace environment. For multiple entries, separate the tags with commas. serviceTypes Enter the list of Dynatrace service types from where to ingest the data into CMDB. For multiple entries, separate the service types with commas. Hinweis:All service types except for DATABASE_SERVICE are mapped to the Calculated Application Service [cmdb_ci_service_calculated] CMDB table. The DATABASE_SERVICE service type is mapped to the Database Instance [cmdb_ci_db_instance] CMDB table.Valid values are:
- BACKGROUND_ACTIVITY
- CICS_SERVICE
- CUSTOM_SERVICE
- DATABASE_SERVICE
- ENTERPRISE_SERVICE_BUS_SERVICE
- EXTERNAL
- IBM_INTEGRATION_BUS_SERVICE
- IMS_SERVICE
- MESSAGING_SERVICE
- QUEUE_LISTENER_SERVICE
- RMI_SERVICE
- RPC_SERVICE
- WEB_REQUEST_SERVICE
- WEB_SERVICE
managementZoneIds Enter the management zone ID to fetch from your Dynatrace environment. For multiple entries, separate the zone IDs with commas. - Select Update.
- Complete the Configure Instance Settings task by selecting Mark as Complete.
- Specify the instance settings as needed and select Update.
-
Execute the Fix Older Ids fix script to migrate the IDs of the imported data from the previous format to the latest format of the object IDs.
Hinweis:Beginning with the 1.9.0 version of the Service Graph Connector for Observability - Dynatrace, the latest format of the object IDs, which is Base64 Encoding, is used for data import. The Fix Older Ids fix script migrates any existing data with previous object IDs to the latest format.
-
Configure the notification settings.
The setup enables pulling ITOM events from Dynatrace into the ServiceNow instance.
- In the Configure Problem Notification section, select Configure.
- To push the configuration to Dynatrace, select Problem Notification Setup.
- To receive the configuration from Dynatrace, select Fetch Notification Setup.
- Complete the Configure Problem Notification task by selecting Mark as Complete.
-
Clean up records from the previous instance.
Hinweis:If you are not migrating from the previous Dynatrace version, you can skip this step.
- On the Setup page, in the Clean Up Records From Previous Integration section, select the Execute the New Integration task.
- On the next page, in the Execute the New Integration section, select Configure and select Update.
- Select Mark as Complete.
-
In the Verify Integration Execution Has Completed section, verify the integration execution.
- Select Configure.
- In the State field, wait for the field to change to Complete or Complete with errors.
It is normal to have errors during the migration from an older version.
- To refresh the list, select and hold (or right-click) the header and select Refresh List.
- Select Mark as Complete.
- In the Delete Application Services Left Over From Previous Version section, select Configure to delete any application services that you no longer need from the previous integration.
- Select Mark as Complete.
-
In the Cleanup Identification Remnants - Copy Script section, copy the script.
- Select Configure.
- Change the current scope to Global.
- Select the menu icon (
).
- Select Insert and Stay.
- Select Mark as Complete.
-
In the Cleanup Identification Remnants - Execute Script section, execute the script.
- Select Configure.
- Select the record of the script you copied.
- Select Update.
- Wahlweise:
Add multiple instances.
Hinweis:If you do not need to add multiple instances, you can skip this step.
- In the Add Multiple Instances section of the Service Graph Connector for Observability - Dynatrace page, select Get Started.
-
Update the data source access to create a data source for the new connection.
- Ensure that you have edit permissions for the Datasource [sys_data_source] table.
- For the Update Data Source Access task, select Configure.
- To edit the record, select the Global application scope from the application picker.
- In the Application Access related list of the Data Source form that opens in a new tab, select the Can create, Can update, and Can delete check boxes.
- Select Update to return to the guided setup page.
- Select the Service Graph Connector for Observability Dynatrace application scope from the application picker.
- Set the Update Data Source Access task to complete by selecting Mark as Complete.
-
Update the scheduled data import access to create a scheduled import for the new connection.
- Ensure that you have edit permissions for the Scheduled data import [scheduled_import_set] table.
- For the Update Scheduled Data Import Access task, select Configure.
- To edit the record, select the Global application scope from the application picker.
- In the Application Access related list of the Data Source form that opens in a new tab, select the Can create, Can update, and Can delete check boxes.
- Select Update to return to the guided setup page.
- Select the Service Graph Connector for Observability Dynatrace application scope from the application picker.
- Set the Update Scheduled Data Import Access task to complete by selecting Mark as Complete.
-
Update the value access to create the data source for the new connection.
- Ensure that you have edit permissions for the Value [sys_variable_value] table.
- For the Update Value Access task, select Configure.
- To edit the record, select the Global application scope from the application picker.
- In the Application Access related list of the Data Source form that opens in a new tab, select the Can create, Can update, and Can delete check boxes.
- Select Update to return to the guided setup page.
- Select the Service Graph Connector for Observability Dynatrace application scope from the application picker.
- Set the Update Value Access task to complete by selecting Mark as Complete.
-
Clear the data source and import set cache for the new connection.
- For the Clear Cache for Datasource and Import set task, select Configure.
- In the Run script text box of the background
script page, enter the following
script:
GlideTableManager.invalidateTable("sys_data_source"); GlideCacheManager.flushTable("sys_data_source"); GlideTableManager.invalidateTable("scheduled_import_set"); GlideCacheManager.flushTable("scheduled_import_set"); GlideTableManager.invalidateTable("sys_variable_value"); GlideCacheManager.flushTable("sys_variable_value"); GlideTableManager.invalidateTable("sys_db_object"); GlideCacheManager.flushTable("sys_db_object"); - Select Run Script to run the background script in
the global scope.
The script may take several minutes to execute.
- After the script is executed, select Close.
- Select the Service Graph Connector for Observability Dynatrace application scope from the application picker.
- Set the Clear Cache for Datasource and Import set task to complete by selecting Mark as Complete.
-
Add another connection.
- Ensure that the application scope is set to Service Graph Connector for Observability in the application picker.
- For the Add Another Connection task, select Configure.
- On the Workflow Studio page that opens in a new browser tab, select Add Connection.
- On the form, fill in the fields.
Tabelle : 2. Connection form Field Description Connection Name Display name for the connection. Connection Hostname Host name of the Dynatrace instance. API Key Dynatrace API Key. Hinweis:The API Key must be prefixed with api-token. - Select Create Connection.
- Return to the guided setup page.
- Set the Add Another Connection task to complete by selecting Mark as Complete.
-
If using a Grail-enabled tenant, configure additional OAuth 2.0 connections.
- For the Add another OAuth connection task, select Configure.
- On the Workflow Studio page that opens in a new browser tab, select Add Connection.
- Enter a name, the connection URL, OAuth client ID, and OAuth client secret details.
- Select Create and Get OAuth Token.
- Return to the guided setup page.
- Set the Add another OAuth connection task to complete by selecting Mark as Complete.
-
If using a Grail-enabled tenant, select the OAuth 2.0 client credentials alias created earlier in the Add another OAuth connection task.
- For the Link connection record with OAuth client credentials task, select Configure.
- In the OAuth 2.0 Connection and Credentials Alias field, search for and select the OAuth connection alias you created in the step 9.g.
- In the Service Graph connection record, search for and select the connection record you created in step 9.f.
- Select Submit.
- Return to the guided setup page.
- Set the Link connection record with OAuth client credentials task to complete by selecting Mark as Complete.
- Wahlweise:
Set up the MID Server for the connection you created.
- For the Configure Mid Servers task, select Configure.
- Select the name of the connection you created.
- Select the Use MID server check box.
- Select Update.
- Set the Configure Mid Servers task to complete by selecting Mark as Complete.
-
Configure the instance settings.
- In the Configure Instances section, select Configure.
- Select the name of the connection you want to configure and then select Update.
- Set the Configure Instances task to complete by selecting Mark as Complete.
-
Test the new connections.
- For the Test Connections task, select Configure.
- Select the name of the connection you want to test.
- To validate the data source configuration, select Test Load 20 Records.
- When the Status field is set to Success, select Update to close the Test the connection dialog box and return to the guided setup page.
If any of the tests have errors, follow the suggestions for remediation.
- Set the Test Connections task to complete by selecting Mark as Complete.
-
Create default notification payload templates.
- Ensure that you have the access token with the following scopes:
- Read configuration (ReadConfig)
- Write configuration (WriteConfig)
- Read log content (LogExport)
- Read metrics (metrics.read)
- For the Create Default Notification Payload Templates task, select Configure.
- Select the connection you want to create a default notification payload template for.
- Update the name of the payload template, if needed.
- Select Problem Notification Setup.The notification is created with the payload parameters as described in the following table.
Tabelle : 3. Notification payload paramters Parameter Description name Name of the notification. The name is automatically prefixed with ServiceNow Default Problem Notificationand the instance name is added to it.alertingProfile ID of the alerting profile in Dynatrace. type Type of payload that is automatically set to webhook.url Webhook URL in the format https://https://<instance name>.service-now.com/ /api/sn_em_connector/em/inbound_event?source=SGO-Dynatrace.payload Custom payload created for notification in the following format: { "ImpactedEntities": {ImpactedEntities}, "ImpactedEntity": "{ImpactedEntity}", "PID": "{PID}", "ProblemDetailsHTML": "{ProblemDetailsHTML}", "ProblemDetailsJSON": {ProblemDetailsJSON}, "ProblemDetailsMarkdown": "{ProblemDetailsMarkdown}", "ProblemDetailsText": "{ProblemDetailsText}", "ProblemID": "{ProblemID}", "ProblemImpact": "{ProblemImpact}", "ProblemSeverity": "{ProblemSeverity}", "ProblemTitle": "{ProblemTitle}", "ProblemURL": "{ProblemURL}", "State": "{State}", "Tags": "{Tags}" } - Repeat the steps for each connection.
- Set the Create Default Notification Payload Templates task to complete by selecting Mark as Complete.
- Ensure that you have the access token with the following scopes:
-
Set up scheduled import jobs.
- In the Set up scheduled import jobs section of the Service Graph Connector for Observability - Dynatrace page, select Get Started.
- For the Configure the scheduled import jobs task, select Configure.
- Select the name of the scheduled import you want to run.
-
On the Scheduled Data Import form, verify the field values for the scheduled job and select the Active check box.
For more information, see Schedule a data import.
- Select Update.
- Set the Set up scheduled import jobs task to complete by selecting Mark as Complete.