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® App your instance will have the capabilities to have AppDynamics Map iQ data fed into ServiceNow®. This data is fed into a custom Business Service which is then linked to the CMDB CIs via the reconciliation engine. Additionally events can be sent to the Event Management module which allows for correlation of alerts from multiple tools. The integration can create incidents correlated back to the correct CI within the CMDB via the IT Service Management module

The following AppDynamics entities will be exported to ServiceNow® CIs.

  1. Controller
  2. Application
  3. Tier
  4. Node
  5. Business Transaction
  6. Remote Service
  7. Database

2. Prerequisites

  • The ServiceNow® AppDynamics Service Model Integration Application should be installed on your ServiceNow® instance from the ServiceNow store. Please login to ServiceNow® Store for instructions. Please make sure that you follow the instructions under System Requirements and Other Requirements sections.

3. CMDB Sync

This is a standalone jar file that should be executed as a java program from any machine. Included in the jar is a small webserver allowing for a graphical configuration or command line only operation. The machine running the tool should have connectivity to the AppDynamics Controller as well as the ServiceNow® Instance

3.1 Prerequisites

  • 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-$ 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
  2. Enable Authentication  # This will create a local login with the following credentials.
    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 “ServiceNow Integration” left hand menu bar
  1. Click “AppDynamics Controllers” and add your controller(s).
  2. Click “ServiceNow Instances” and add your ServiceNow instance(s).
  3. 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.
      • Application - Top level construct for AppDynamics APM
      • Node - Application instances monitored by AppDynamics
      • Tier - Collection of Nodes
      • Node to Hardware - Links the AppDynamics model within ServiceNow to the underlying Hardware CIs in the CMDB
      • 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
  4. 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.
  5. 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
  6. 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 login 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
    • x_apd_appdynamics.appdynamics_role
    • evt_mgmt_user
    • 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:
    • To enable debug logging, edit the file conf/logback.xml and change the level of the logger com.appdynamics to DEBUG
    • 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/ 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 Service Model Integration application from ServiceNow® Store
  2. Run the AppDynamics to ServiceNow Data Transfer Utility and verify that the entities are imported into your ServiceNow® instance. Please refer to the section 3 for details.

4.2 Installation and Configuration

Please fill up the following values in the HTTP Request Template

  1. Name: Any name to uniquely identify the template
  2. Request URL
    1. Method: POST
    2. Raw URL: https://<your-instance> 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
      • x_apd_appdynamics.appdynamics_role
      • evt_mgmt_user
      • 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. Support

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