This page describes how to integrate the AppDynamics for ServiceNow® application with ServiceNow®.

Download

To download, visit the AppDynamics Community Exchange.

Version 20.7

AppDynamics has released a new version of the sync utility to integrate with the Orlando Release of ServiceNow®. To review version-specific configuration details, see New Version 20.7.

Please review this version compatibility matrix to guide your installation and upgrade decision:

Integration VersionAppDynamicsServiceNow®
20.7>= 4.5.0.1 Orlando and later
3.1>= 4.5.0.1 New York and earlier

Use Case

AppDynamics Application Performance Monitoring traces every transaction and builds real-time application topology. The ServiceNow® integration provides these capabilities:

  • AppDynamics application topology feeds data into the AppDynamics for ServiceNow® application as custom tables in the CMDB. 

    In this version, monitored servers can be reconciled with the ServiceNow® appropriate CMDB Server CIs.

  • AppDynamics can send alerts to the ServiceNow® Event Management application and use the AppDynamics created entities. The AppDynamics for ServiceNow® application imports the AppDynamics alerts as entities. These entities can be used only when they are added to the ServiceNow® table. The AppDynamics for ServiceNow® application then creates a ServiceNow® table that maps with the entities. 

This table lists these entities along with the ServiceNow® table that is created to represent them:

AppDynamics Entity InstalledServiceNow® Table Created
Applicationx_apd_appdynamics_application
Business Transactionx_apd_appdynamics_business_transaction
Controllerx_apd_appdynamics_controller
Databasex_apd_appdynamics_database
Nodex_apd_appdynamics_node
Remote Servicex_apd_appdynamics_remote_service
Tierx_apd_appdynamics_tier

Before You Begin the Integration

This integration requires that you download, install, and complete the following tasks, in this order, before starting the integration. 

  1. Download and install the AppDynamics for ServiceNow® application from the ServiceNow® Store.
    This application creates the custom AppDynamics tables in the Configuration Management Database (CMDB). 
  2. Download, install, and configure the Data Sync Utility.
    This utility makes API calls to AppDynamics and ServiceNow® to push our topology into the CMDB tables.
  3. Once the data sync utility has been configured, go back to the utility and choose to download and install the Alerting template. 
    The template contains the proper settings for AppDynamics to send alerts to the event service in ServiceNow®. 
  4. Install Java >= 1.8 on the machine that runs this program.
  5. Start Java with 512 MB of initial memory (-Xms512m).

Add AppDynamics Discovery Source to ServiceNow®

You must create an AppDynamics Discovery Source before installing the integration from the ServiceNow® Store:

  1. Log in to the ServiceNow® store.

  2. In the left menu, select System Definition > Choice Lists.

  3. Click New.

  4. Specify the following details only. Do not change the values of other fields.

    Table

    Configuration Item [cmdb_ci]

    Element

    discovery_source

    LabelAppDynamics
    ValueAppDynamics

Download AppDynamics for ServiceNow® Application

Download the AppDynamics for ServiceNow® application from the ServiceNow® store and install it on your ServiceNow® instance. 

Ensure that you follow the instructions under the System Requirements and Other Requirements sections of the ServiceNow® download page.


To use Node-to-Server CI Reconciliation in ServiceNow® >= 3.1, you must have:

Download AppDynamics-ServiceNow® Data Sync Utility 

Download the Data Sync Utility zip file from the AppDynamics Exchange. 

You can download this utility either as a standalone Java application or as a JAR file. The standalone Java application can run on a Windows or Linux host and the JAR file can run as a Java program on any host machine.

This host must have connectivity to both the target ServiceNow® instance and the target AppDynamics Controller.
The downloaded file includes a lightweight web server that has a basic web application to configure the integration. You can also run the integration in CLI mode only.

Server Options

Download and unzip the appdynamics-cmdb-service-$version.zip Data Sync Utility file.

  1. Unzip the appdynamics-cmdb-service-$version.zip file.
  2. Start the Server.
    1. init.d service (System V)

      sudo ln -s /path/to/appdynamics-cmdb-service/appdynamics-cmdb-service.jar /etc/init.d/appdynamics-cmdb-service
      sudo /etc/init.d/appdynamics-cmdb-service start
      PY

      The java options can be configured in the $HOME/appdynamics-cmdb-service.conf file.
      The application logs are created in the $HOME/logs directory.
      The system out logs are created in the /var/log/appdynamics-cmdb-service.log file.

    2. Windows (winsw):

      Open a terminal and navigate to the appdynamics-cmdb-service folder where you extracted the zip file:

      cd C:\Path-to\appdynamics-cmdb-service
      PY

      Run the following command:

      javaw -jar appdynamics-cmdb-service.jar
      PY


      The Java options can be configured in the %$HOME%/bin/appdynamics-cmdb-service-win.xml file. 

      The logs are created in the $HOME/logs directory.

    3. Other platforms:

      java -Xms512m -jar /path/to/appdynamics-cmdb-service.jar
      PY

      The application logs are created in the $HOME/logs directory.

Upgrades

  1. Backup the data directory data/ where the java sync utility is installed.

  2. Overwrite the existing installation with the new file.

Setup

  1. init.d service: The configuration file is located at $HOME/appdynamics-cmdb-service.conf. Add the params to the JAVA_OPTS property.
  2. Windows service: The configuration file is located at $HOME/bin/appdynamics-cmdb-service-win.xml. Add the params to the <arguments> property.
  3. jar: Add the params directly to the command preceding -jar ...

Options

  • Use a different port:

    -Dserver.port=8080
    PY
  • Enable authentication:

    -Dplatform.security.enabled=true  # This will create a local login with the following credentials.
    -Dplatform.username=user
    -Dplatform.password="deFAultPwd4P1atfrm"
    -Dplatform.security.encryption-key=mykey
    -Dplatform.security.encryption-salt=mysalt
    PY

    The encryption-key and encryption-salt are optional.

Configure the Data Sync Utility

User Roles and Permissions 

The Sync Utility needs to communicate with both an AppDynamics Controller and a ServiceNow® instance. We recommend using a service account for this access:

  • AppDynamics Controller: 

    The service account user requires these roles with rights to all applications to be synchronized.

    • Applications and Dashboards Viewer
    • Server Monitoring User—Optional if you want to enable node-to-server CI reconciliation
  • ServiceNow®: These roles should be assigned to the ServiceNow® user account that will be posting data to ServiceNow®:

    This user can be set to web service access only on the user form.

  • If Event Management is activated in your ServiceNow® instance, add these roles: 

    • x_apd_appdynamics.appdynamics_role
    • evt_mgmt_user
    • evt_mgmt_integration
    • mid_server—Optional if you want to do server CI reconciliation.

    • app_service_admin—Required for sync utility v20.7.
  • If Event Management is not activated, add these roles:

    • x_apd_appdynamics.appdynamics_role

    • itil

    • mid_server—Optional if you want to do server CI reconciliation.

    • app_service_admin—Required for sync utility v20.7.

Domain Separated ServiceNow® Instances

If your ServiceNow® instance is domain-separated, a unique user account is required for each domain you want to update in the CMDB. For each domain:

  1. Create a user account as described in User Roles and Permissions with the required roles.
  2. Assign this user to the appropriate domain for the applications that it needs to access.
  3. Create a new ServiceNow® instance with the appropriate user for each domain. 
  4. Set up synchronization for the applications appropriate for each domain user.

Synchronize with the CMDB

The integration supports the synchronization of one or more ServiceNow® instances with one or more AppDynamics Controllers.

  1. Log in to the Sync Utility. 
    1. Open http://<host>:8080 on a browser.
    2. The default username is user and the default password is deFAultPwd4P1atfrm.

      This can be overridden by the java startup property -Dplatform.password=welcome. See Server Options.

  2. Select the Service Model Integration left menu bar.
  3. Click AppDynamics Controllers and add your Controller(s).

    If your Controller is on-premises or dedicated SaaS (single-tenant), the Account Name will be customer1.

  4. Click ServiceNow® Instances and add your ServiceNow® instance(s).
  5. Click Synchronize from the top menu.
  6. Choose applications from the Applications list to export to ServiceNow®.
  7. Select which AppDynamics Relationships to Synchronize to include:

    • Tier to Tier

    • Tier to Remote (Remote Services)

    • Tier to Application 

    • Node-to-Server CI

      • Reconciles the node host with an existing Server CI and builds a Runs relationship with the x_apd_appdynamics_node running on it. See Node-to-Server CI Reconciliation.

  8. Click Run Diagnostics to begin verification without creating any data. 
    • If successful, click Synchronize to run a one-time synchronization.
    • If not successful, address the issues in the diagnostic messages provided.

Most integration users may like the synchronization to run at regular intervals to keep the service models. The integrated scheduler function allows for the creation and running of synchronization automatically.

UI TabDescription
SchedulesAllows schedule creation using a cron expression. The Synchronize options on this page are the same as the other configuration panes.
HistoryProvides a graphical view of prior runs. You can expand each run to get details of the run, including error messages.
SettingsProvides additional settings for connection timeouts, SSL, proxy configuration, and additional static values that can be added to fields in various CMDB tables.

After the synchronization is complete, log in to ServiceNow® instance and select the AppDynamics menu item to view the tables and data associated with the integration.

Node-to-Server CI Reconciliation 

In >= 3.1, the Node-to-Server CI checkbox in the sync utility builds a relationship between an AppDynamics Node (x_apd_appdynamics_node) and the underlying host Server CI (cmdb_ci_linux_server, cmdb_ci_windows_server) in the ServiceNow® CMDB.  

To use this feature, a Machine Agent with Server Visibility enabled must be installed and running on each host that supports an imported AppDynamics Node. See Machine Agent with Server Visibility.

The integration uses the default ServiceNow® hardware identification rules for reconciliation:

  • Name: AppDynamics uses the operating system-reported hostname as the value for this field, which is subject to the following Discovery Property settings in ServiceNow®, whether Discovery is installed or not: 

    The mid_server role must be assigned to the ServiceNow® user for the integration to read these properties.

    1. glide.discovery.hostname.case

    2. glide.discovery.hostname.include_domain

    3. glide.discovery.fqdn.regex 

Refer to the ServiceNow® product documentation for more information about these properties. 

  • IP Address + MAC address (Network Adapter Table): AppDynamics uses any adapter with a valid IPv4 or IPv6 address and a MAC address.

These attributes are provided by Machine Agents with Server Visibility enabled for Controller and Machine Agent >= 4.5.0.1.

  1. To avoid duplicate Server CIs being created by this integration, any discovery sources employed must adhere to the same hardware identification rules: 
    1. Name in the Server CI should match the system reported hostname subject to the Discovery properties described above.
    2. For each Server Network Adapter, the ip_address and mac_address must be populated in the Network Adapter table and related to the Server CI.

      ServiceNow® CMDB Identification and Reconciliation will not consider IP Address and MAC Address values populated on the Server CI form directly.

  2. This integration identifies Linux and Windows servers and reconciles them to their respective CI classes on update or create (cmdb_ci_linux_server & cmdb_ci_windows_server). 

    If a server is not Windows or Linux, no CMDB relationships will be created.

Fields Populated in ServiceNow® by Node-to-Server CI Reconciliation

For the appropriate Server Class (cmdb_ci_*_server) and related to the parent AppDynamics Node:

ServiceNow® Server CI Field

AppDynamics Server Visibility Attribute Used

Name (name)

The reported Hostname—the Sync Utility reads and uses the discovery properties listed above to determine the hostname.

Hostname (host_name)

The reported Hostname.


Each Network Adapter reported populates the Network Adapter CI (cmdb_ci_network_adapter) and related parent Server CI:

ServiceNow® Network Adapter CI Field

AppDynamics Server Visibility Attribute Used

IP Address (ip_address)

IP Address with /x removed. 

Using either IPv4 or IPv6 Address as reported.

If neither is populated, the adapter is not synced.

MAC Address (mac_address)

The reported MAC address.

Add Static Values to Required Fields

If there are required fields in your CMDB that AppDynamics does not populate, you can use the CMDB Additional Fields to add multiple static values per table.

  1. Navigate to the AppDynamics-ServiceNow® Sync Utility.
  2. Select Settings.
  3. Select CMDB Additional Fields.
  4. For the desired CI table, click Add Field.
  5. Enter the ServiceNow® Field Name (not the label).
  6. Enter the static value to populate all records of this type. For example, if you are required to populate the hardware_status field on all cmdb_ci_server and child class records, enter “hardware_status” and then “Installed”.
  7. Click Save.

Considerations for Dynamic Application Environments

If the application environments you are monitoring with AppDynamics change frequently, you may end up with artifacts in the ServiceNow® CMDB that no longer reflect the current state of your application topology.

In order to address this, ServiceNow® provides documentation on how to configure “data refresh rules” in the CMDB so that irrelevant AppDynamics CIs can be removed. For the New York release, see Create data refresh rules.

Create Business Service CI 

AppDynamics Application to ServiceNow® Application Service Relationships

Health rule violation alerts related to a ServiceNow® Application Service are shown in the Event Management Dashboard. There are two ways to build this relationship based on the current state of the ServiceNow® CMDB:

If Business Services do not exist:

  1. If there are no Business Service CIs in the CMDB, ensure that the Create Business Service checkbox is checked when initially synchronizing an application. Follow the instructions in the Sync Utility documentation that explain how to convert that CI to an Application Service (cmdb_ci_service_discovered) CI that can be shown on the ServiceNow® Event Management Dashboard. 
    You must select six (6) levels of CIs to include in the model. 

This step requires the app_service_admin role. See the ServiceNow® Convert a business service to an application service.


If Business Services exist:

If the Business Service entities are Application Service class CIs, a relationship can be manually created between the AppDynamics Application and the ServiceNow® Application Service. To create the relationship:

  1. Open the AppDynamics Application CI (x_apd_appdynamics_application).
  2. Click Add CI relationship.
  3. In the filter, set the “Class” - “is” - “Application Service”. 
  4. Click Run Filter.
  5. Select the Application Service CI.
  6. Select the Runs On::Runs relationship.
  7. Click Create new relationships with selected configuration item(s).

AppDynamics Tier to ServiceNow® Application Service Relationships

In some cases, an AppDynamics Tier may be the correct entity to relate to a ServiceNow® Application Service. To build this relationship in the ServiceNow® CMDB:

  1. Open the AppDynamics Tier CI (x_apd_appdynamics_tier). 
  2. Click Add CI relationship.
  3. In the filter, set the “Class” - “is” - “Application Service”.
  4. Click Run Filter.
  5. Select the Application Service CI.
  6. Select the Runs On::Runs relationship.
  7. Click Create new relationships with selected configuration item(s).

Additional Application Relationships

The AppDynamics Application description and Tier description fields are populated in the AppDynamics Application CI (x_apd_appdynamics_application) and AppDynamics Tier CI (x_apd_appdynamics_tier) respectively:

TableApplication CI FieldAppDynamics Field Used
x_apd_appdynamics_applicationDescription (short_description)Application description
TableTier CI FieldAppDynamics Field Used
x_apd_appdynamics_tierDescription (short_description)Tier description

Troubleshooting 

Logs

The logs are generated in the logs/ directory where the application is installed.

Debug Logs:

To enable debug logging, edit the file conf/log4j2.xml and change the level of the logger com.appdynamics to DEBUG.

Read Timeouts

If you encounter any Read Timeout errors while doing the sync:

  1. Increase the Socket Timeout value in the Settings tab up to 60,000 initially and higher if needed.
  2. Reduce the Sync Batch Size of entities to ServiceNow® Instance. 
  3. Navigate to the Installation directory.
  4. Find the conf/application.properties file and adjust the size value.

  5. Restart the AppDynamics ServiceNow® Sync Utility service or daemon (Required).

Events Integration

This section assumes that you are familiar with the configuration of HealthRules, Policies, and Actions in AppDynamics. See Alert and Respond.

The Events integration uses the HTTP templates feature in the Controller to push events to the ServiceNow® Events API. The details of the ServiceNow® Events API can be found here. See HTTP Request Actions and Templates.

Prerequisites

  • Download and install the AppDynamics for ServiceNow® application on your ServiceNow® instance. 
  • Run the AppDynamics-ServiceNow® Data Sync Utility and verify that the entities are imported into your ServiceNow® instance. See Data Sync Utility.
  • Activate the ServiceNow® Event Management plugin.

Events Installation and Configuration

In this section, you will create an Action, configure Health Rule Violations, and create binding Policies.

Create an Action on the AppDynamics Controller 

  1. Log in to the web UI for the AppDynamics-ServiceNow® Data Sync Utility. 
  2. Select Service Model Integration Event Integration.
  3. Select the Controller you would like to configure. If one is not configured, see Data Sync Utility Configuration.
  4. Click Download Template.

Use the downloaded file to configure the HTTP Request template in AppDynamics. You will then create an Action and apply that action to a policy that specifies a health rule and action. To create the new Action:

  1. Navigate to the Alert & Respond top menu in your AppDynamics Controller. 
  2. Click Alert & Respond > HTTP Request Templates in the left navigation.
  3. Select the resource on which the action is to be created.
  4. Click New and fill out the following fields:
    1. Name: Any name to uniquely identify the template
    2. Request URL
      1. MethodPOST
      2. Raw URLhttps://<your-instance>.service-now.com/em_event.do?JSONv2&sysparm_action=insertMultiple. Replace <your-instance> with the id of the actual instance.
    3. Authentication
      1. TypeBASIC
      2. Enter the user name and password of your ServiceNow® instance. 

        Ensure you have already configured the ServiceNow® User and Roles as described in User Roles and Permissions.

    4. Payload
      1. MIME Typeapplication/json
      2. Copy the contents from the downloaded file, event-request-template.txt, and then paste it in the Payload text area 
      3. Update the controllerName in the first line of the file. It must be the same value that you set while adding the AppDynamics Controller Name in the Sync Utility.
  5. Save the HTTP Template.

Configure Health Rules on the AppDynamics Controller

  1. Select the Alert & Respond tab. 
  2. Select Health Rules.
  3. Use the Select dropdown to choose an application on which you want to alert.

  4. Review the list of Health Rules configured out-of-the-box for that application. Add more Health Rules if needed.

Create a Policy on the AppDynamics Controller to Bind Health Rules to Actions

  1. Select Alert & Respond > Policies.
  2. Select Create a Policy Manually if there are no policies configured already. 
  3. Select the type of scenarios on which you want to receive alerts. 

    Checking all the boxes might lead to an alert storm on your ServiceNow® instance.

  4. Click Save

  5. Select the Health Rule Scope defining which tiers and nodes the Health Rule should cover and click Save.

  6. Select the Object Scope and choose the Tiers and Nodes to be covered in this policy and click Save
  7. Select Actions
  8. Click Add + sign to create a new Action.
  9. Select the ServiceNow® Action you created Create an Action on the AppDynamics Controller and click Save.

Create a Manual Entry Point for the AppDynamics Monitored Application on the Application Service CI

If you are connecting to a ServiceNow® instance running Orlando or later, skip this section and refer to the New Version 20.7 instructions.

For AppDynamics alerts to impact the health of an application service in ServiceNow® Event Management, you must create a manual entry point.

  1. If you chose to have the Sync Utility create a Business Service:
    1. Make sure you convert the service to an application service by following the prompts in the sync utility after synchronizing the application. 
    2. This conversion will add the manual entry point automatically.
  2. If you already have Application Service CIs that you want to associate with an AppDynamics monitored application (or application tier):
    1. Open the Application Service CI record.
    2. Click Add Entry Point.
    3. Select the AppDynamics monitored Application or Tier CI Type.
    4. Select the name of the AppDynamics monitored application or tier to associate.
    5. Click Save.
    6. Click the Additional Info link.
    7. Click the Update with changes from CMDB UI Action link.
    8. Select the number of levels of related CIs to include in the new application service.
    9. Click OK

New Version 20.7

Requirements

Versions

  • AppDynamics >= 4.5.0.1 is required.
  • ServiceNow® instances to be synchronized must be running Orlando or greater.

New Roles

  • No additional roles are needed for the service account in AppDynamics.
  • The service account in ServiceNow® will also need the app_service_admin role.

Upgrade to Version 20.7

To upgrade an existing sync utility, follow the upgrade section. Below are some answers to questions about upgrading an existing sync utility:

What happens to existing applications that have already been synchronized?

Existing AppDynamics monitored applications and related entities that have been synchronized to a ServiceNow® CMDB from previous versions of the sync utility will remain in the CMDB. When the same application is re-synchronized using 20.7, a calculated service CI is created for those applications (or tiers) as configured. See Creating Calculated Application Service CIs.

What happens to existing manual entry points?

If you created manual entry points for Application Service CIs using AppDynamics monitored application CIs x_apd_appdynamics_application will remain as-is. After synchronizing using 20.7 of the sync utility, a new calculated application service CI will be added to the relationships.

AppDynamics recommends that you remove any previously created entry points and create a manual entry point to the new Calculated Application Service cmdb_ci_service_calculated CI. To do this:

  1. To remove the existing manual entry point:
    1. Open the Application Service CI you are monitoring with Event Management 
    2. Click - next to the Manually Added CI link and click Remove.
  2. Add a manual entry point for the calculated application service: 
    1. Open the application service CI you are monitoring in ServiceNow.
    2. Click Add Entry Point.
    3. Select Manually Created.
    4. For CI Type, select Calculated Application Service.
    5. For CI Name, select the name for the application you synched.

Create Calculated Application Service CIs

Orlando introduces a new CI class called Calculated Application Service cmdb_ci_service_calculated.  This new class is dynamic and provides additional capability to automatically update a service map when relationships in the CMDB change for CIs that are part of the application service. 

Some AppDynamics customers monitor applications as Tiers. With the new version 20.7, you can map AppDynamics Applications or AppDynamics Tiers to cmdb_ci_service_calculated CIs in ServiceNow®

Select Tiers to Monitor as Application Services in ServiceNow® 

By default, all applications monitored by an AppDynamics controller relate to a new calculated application service when synchronized for the first time with 20.7 with a Used By::Depends On relationship.

To sync monitored tiers to a calculated Application Service CI in ServiceNow®:

  1. Navigate to Application Mappings.

  2. Add a Controller if none exists, or select the Controller from the dropdown. A list of all the AppDynamics monitored applications in the selected Controller display in the left panel. 

  3. To map each tier of a monitored application to a Calculated Application Service CI, move that application to the right bucket as an Application Group.

Synchronize the Application Services in ServiceNow®

ServiceNow® requires that each Calculated Application Service CI (cmdb_ci_service_calculated) has a unique name. When synchronized for the first time using 20.7, a new Calculated Application Service CI is created with this naming convention: 

  • By default, each monitored application will have a Calculated Application Service CI named: 

    • AppD - AppNameGoesHere (controllerName)

  • If an application is designated as an Application Group, each monitored tier will have a Calculated Application Service CI named:

    • AppD - AppnameGoesHere:TierNameGoesHere (controllerName)

AppDynamics Application & ServiceNow Calculated Application CI Dashboard

Use the View Mapped Applications dashboard to view the mappings between AppDynamics Applications (and Tiers) and ServiceNow® Calculated Application CI. 

To delete a mapping from ServiceNow®, click the red 'X' to delete the mapping from this panel. This will delete both the Calculated Application CI and the relationship displayed. The AppDynamics entities in the CMDB will remain.

Event Integration Enhancements

The Event Integration Template has several enhancements in the 20.7 release. Alerts are more easily bound to Business Transaction and Node CIs.

Support

For questions or feature requests, please contact AppDynamics Help.