AppDynamics CMDB Sync and Event Management Integration for ServiceNow

1. Use Case

AppDynamics Application Performance Monitoring traces every transaction and builds real-time application topology. With this ServiceNow® integration your instance will have the following capabilities:

  1. AppDynamics application topology is fed into the AppDynamics for ServiceNow® application as custom tables in the CMDB. (Note - in a future release this will instead be reconciled with the ServiceNow® appropriate CMDB CIs).
  2. AppDynamics events can be sent to the ServiceNow Event Management application and bound to the AppDynamics created entities.
  3. If you are utilizing Operational Metrics or MetricBase products within ServiceNow, the integration can bring AppDynamics performance metrics into the ServiceNow solution.

The following AppDynamics entities will be imported into the AppDynamics for ServiceNow application in ServiceNow:

  1. Controllers
  2. Applications
  3. Tiers
  4. Nodes
  5. Business Transactions
  6. Databases
  7. Remote Services

This integration has the following components:

  1. AppDynamics for ServiceNow Application (AppDynamics Service Model Integration) which is downloadable from the ServiceNow store and is installed in ServiceNow instance.
  2. AppDynamics-ServiceNow Data Sync Utility (appdynamics-cmdb-service) downloadable from this page is a standalone application and can reside on any machine which has connectivity to ServiceNow instance and the AppDynamics Controller.
  3. (Optional) HTTP Template (event-request-template.vm) downloadable from this page is required if you intend to push events from AppDynamics to the ServiceNow Event Management module.

2. Prerequisites

The AppDynamics for ServiceNow Application should be installed on your ServiceNow® instance from the ServiceNow store. Please login to ServiceNow® Store and search for “AppDynamics” for instructions. Please make sure that you follow the instructions under System Requirements and Other Requirements sections of this document.

The AppDynamics for ServiceNow Application will create the following custom tables in your ServiceNow instance to represent these AppDynamics entities:

AppDynamics EntityServiceNow 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


3. AppDynamics-ServiceNow Data Sync Utility

This is a standalone JAR file that should be executed as a java program from any machine. Included in the jar is a small web server which has a simple web application to configure the integration, alternately the integration can be run in command line only mode. The machine running the Data Sync Utility application must have connectivity to the AppDynamics Controller as well as the ServiceNow® Instance.

3.1 Prerequisites

  1. AppDynamics for ServiceNow application from ServiceNow® Store
  2. Java 1.8+ must be installed on the machine that runs this program

3.2 Installation and Initialization

  1. Download and unzip the appdynamics-cmdb-service-$version.zip from the downloads section
  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
      The java options can be configured in the file `$HOME/appdynamics-cmdb-service.conf`
      The application logs are created in the `$HOME/logs` directory.
      The system out logs are created in the `/var/log/appdynamics-cmdb-service.log`
    2. Windows (winsw)
      %$HOME%/bin/appdynamics-cmdb-service-win.exe install
      The java options can be configured in the file `%$HOME%/bin/appdynamics-cmdb-service-win.xml` The logs are created in the `$HOME/logs` directory.
    3. For other platforms
      java -Xms512m -jar /path/to/appdynamics-cmdb-service.jar
      The application logs are created in the `$HOME/logs` directory
  3. Open http://<host>:8080 on a browser.
  4. The default username is user and the default password is deFAultPwd4P1atfrm. This can be overridden by the java startup property -Dplatform.password=welcome. Please refer the section Server Options for more details.
3.2.1 Upgrades
  1. Backup the data directory data/
  2. Overwrite the exiting installation with the new file

3.3 Server Options

3.3.1 Setup
  1. init.d service: The configuration file is located at $HOME/appdynamics-cmdb-service.conf. Add the params to JAVA_OPTS property
  2. windows service: The configuration file is located at $HOME/bin/appdynamics-cmdb-service-win.xml Add the params to <arguments> property
  3. jar: Add the params directly to the command preceding -jar ...
3.3.2 Options
  1. Use a different Port
    -Dserver.port=8080
  2. 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
    The encryption-key and encryption-salt are optional

3.4 Configuration

The integration supports synchronization of one or more ServiceNow instances with one or more AppDynamics controllers.

Upon logging in, click the “Service Model Integration” left hand menu bar
  1. Click “AppDynamics Controllers” and add your controller(s).
  2. Click “Synchronize" from the top menu.
  3. Click “ServiceNow Instances” and add your ServiceNow instance(s).
  4. Click “Synchronize”
    1. Select the one or more Controllers to selectively synchronize a subset of your Applications monitored by AppDynamics
    2. Select the ServiceNow Instance to which you want to synchronize the selected application data. You may optionally select which relationships you want to import.
      1. Application - Top level construct for AppDynamics APM
      2. Node - Application instances monitored by AppDynamics
      3. Tier - Collection of Nodes
      4. Create Business Service - Creates the business service needed for the Event Management module.
    3. Click on “Run Diagnostics” and verification will begin without creating any data. If this is successful you can then click on “Synchronize”. This will run a one time synchronization
  5. Most integration users would like the synchronization to run at regular intervals to keep the service models. We have build an integrated scheduler function allows for the creation and running of synchronization automatically. Clicking on the Schedules tab allows you to create a schedule using a Cron expression. The Synchronization options on this page are the same as the other configuration screens.
  6. The History tab provides a graphical view of the prior runs, you can expand each run to get details of the run including error messages
  7. In the Settings tab you will find details about connection timeouts, SSL settings, and proxy configuration should you need it

Once the synchronization is completed you may log in to ServiceNow® instance and select the AppDynamics menu item to view the tables and data associated with the integration.

3.4.1 User Roles and Permissions
  1. Controller: The user needs at least Read Only User role
  2. ServiceNow : The following roles should be assigned to the user
    1. x_apd_appdynamics.appdynamics_role
    2. evt_mgmt_user
    3. evt_mgmt_integration

3.5 Troubleshooting

3.5.1 Logs

The logs will be generated in the same directory as the installed application in a directory named logs/

  1. Download Logs: The logs can be downloaded from the UI by selecting the help icon on the top right corner of the screen and Download Server Logs
  2. Debug Logs:
    1. To enable debug logging, edit the file conf/log4j2.xml and change the level of the logger com.appdynamics to DEBUG
    2. The DEBUG logs can be enabled from the UI also. Please click on the help icon on the top right corner of the screen and select Configure Logging. Enter the package name as com.appdynamics and duration of 5 minutes
3.5.2 Timeouts

If you encounter any Read Timeout errors while doing the sync

  1. Increase the Socket Timeout value in the settings tab. The Socket Timeout can be increased to 60,000. If needed increase it to an even higher value
  2. Reduce the sync batch size of entities to ServiceNow Instance. It can be adjusted in the file conf/application.properties in the installation directory. This change requires a restart of the server

4. Events Integration

This section assumes that the user is familiar with the configuration of HealthRules, Policies and Actions in AppDynamics. If not, please refer to 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 Events API can be found here. For more information on the HTTP templates, please refer to HTTP Request Actions and Templates documentation.

4.1 Prerequisites

  1. Install the AppDynamics for ServiceNow application from ServiceNow® Store
  2. Run the AppDynamics-ServiceNow Data Sync and verify that the entities are imported into your ServiceNow® instance. Please refer to the section 3 for details.
  3. Activate the ServiceNow Event Management Plugin

4.2 Installation and Configuration

Log in to the web UI for the AppDynamics-ServiceNow Data Sync tool. Upon logging in click the “Service Model Integration” left-hand menu bar

  1. Click “Event Integration” on the top nav
  2. Select the controller you would like to configure, if one is not configured - see section 3.4
  3. Click “Download Template”
  4. Use the downloaded file to configure the HTTP Request template in AppDynamics.
  5. This can be done from the “Alert & Respond” top menu in your AppDynamics controller. By creating an Action, and applying that action to a policy which specifies a health rule and action. To create the new Action:

    1. Click on “Alert & Respond” in the top menu.
    2. Click “HTTP Request Templates” in the left-hand navigation
    3. Select the proper resource where you want the action to be created.
    4. Click the “New” button and fill out the following fields
      1. Name: Any name to uniquely identify the template
      2. Request URL
        1. Method: POST
        2. Raw URL: https://<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. Type: BASIC
        2. Enter the user name and password of your ServiceNow® instance. The following roles should be assigned to the user
          1. x_apd_appdynamics.appdynamics_role
          2. evt_mgmt_user
          3. evt_mgmt_integration
      4. Payload
        1. MIME Type: application/json
        2. In the payload text area, please copy-paste the contents of the attached file event-request-template.vm. Update the controllerName in the first line of the file. It should be the same value that you have set as the name field of config.yml
      5. Save the HTTP Template

5. Integration into Operational Intelligence and MetricBase

5.1 Prerequisites

  1. AppDynamics for ServiceNow application from ServiceNow® Store
  2. AppDynamics-ServiceNow Data Sync and verify that the entities are imported into your ServiceNow® instance. Please refer to the section 3 for details.
  3. MID Server
  4. ITOM Metric Management / Operational Intelligence Plugin

5.2 ServiceNow Configuration

  1. Configure MID Server within your ServiceNow Environment, for details on installing the MID Server please check the docs based on the ServiceNow version (Kingston/London/Madrid)
  2. Activate ITOM Metric Management (if on Jakarta) or Operational Intelligence (if one Kingston or later) Plugin (Kingston/Madrid)
  3. Configure MID Server for Operational Metrics (Jakarta/London/Madrid)
  4. Create & Start MID Webserver Extension (Kingston/Madrid)
    Supported Authentication Type is Keybased. Please copy the Port and Secret Key for further use.
  5. Create & Start Operational Metrics / Operational Intelligence Extension (Jakarta/London/Madrid)
  6. For all of the above steps, Operational Metrics / Operational Intelligence module in ITOM Guided Setup can be followed.

5.3 AppDynamics-ServiceNow Metric Data Sync Configuration

  1. Within the AppDynamics-ServiceNow Data Sync user interface, on the left-hand menu select Metrics Integration. Select the tab for “MID Web Servers”.
  2. Add your MID Server here, you will be required to submit the URL for the MID Web server, which is running on port 8192 by default. You must also input your secret key obtained in step 5.2.4. You can choose any name you would like to use. Then click “Save”.
  3. Click on the “Schedules” tab. Click “Create Schedule” and select your controller and MID Web Server. Choose the desired frequency and the applications you’d like to bring metrics into ServiceNow for. Finally, click save.
  4. Wait roughly 15 minutes and metrics should start flowing into ServiceNow. You can verify this by not only checking for AppDynamics data in the “Metric to CI” table but also by checking “Insights Explorer” on London or “Metric Explorer” on Jakarta release.

6. Support

For any questions or feature request, please contact AppDynamics Help.


Version:

3.0.0 Integration into Operational Intelligence and MetricBase

3.0.1 Commented “Node to hardware” functionality

3.0.2 Fixes for connection leaks