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®. You can then use this to correlate events within the Event Management component. You can also use this data to create incidents correlated back to the correct CI within Service Management.

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

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

2. Prerequisites

  • The ServiceNow® AppDynamics CMDB Sync Application should be installed on your ServiceNow® instance. Please login to ServiceNow® Store for instructions.
  • Java 1.7+ must be installed on the machine that runs this program

3. CMDB Sync

3.1 Configuration

  1. Download and unzip the appdynamics-cmdb-sync-$version.zip from the downloads section
  2. Edit the file conf/config.yml
    Controller Details
    1. url: The complete http/https url of the controller
    2. name: Any name to identify teh controller. This name will appear as the primary name identifier in ServiceNow®. If you have multiple controllers, please make sure that the name is unique
    3. accountName: The Account Name of the controller. If the controller is installed as single tenant, the Account name will be customer1
    4. userName: The username of the controller
    5. password: The clear text password for the controller. If you wish to set an Encrypted Password, set the properties passwordEncrypted and encryptionKey. Please refer to Encryption Support for details.
    6. passwordEncrypted: The Encrypted Password. Please refer to Encryption Support section for details.
    7. applications: This is a list of applications thet needs to be exported to ServiceNow® CMDB
    ServiceNow® instance Details
    1. url: The URL of the service now instance
    2. userName: The user name of the ServiceNow® instance
    3. password: The clear text password. To use the encrypted password, please refer to Encryption Support section
    4. passwordEncrypted: The encrypted password. For more details, please refer to Encryption Support section
    5. datasource: The name of the datasource. Do NOT edit this.
    6. relation: This section identifies the relations that should be exported into ServiceNow®. No need to edit this.
    YAML is very strict with the syntax. Please validate the file at www.yamllint.com

3.2 Execution

The program can be executed as a java program with the command

java -jar appdynamics-cmdb-sync.jar
Login to ServiceNow® instance and refer to the AppDynamics menu item to view the data

3.3 Troubleshooting

The logs will be generated in the same directory in a folder named logs.

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

3.4 Password Encryption Support

To avoid setting the clear text password in the config.yml, please follow the process to encrypt the password and set the encrypted password and the key in the config.yml

  1. Execute the following command, from the same directory as appdynamics-cmdb-sync.jar. Replace the encryptionKey and clearTextPassword with actual values.
    java -jar appdynamics-cmdb-sync.jar ENCRYPT encryptionKey clearTextPassword
    The script will output the encrypted password.
  2. These values should be used in the passwordEncrypted and encryptionKey fields in config.yml

4. Events Integration

The events integration uses the HTTP Templates feature in the controller to push events to the ServiceNow® Events API. The details of the API can he found here. For more information on the HTTP templates, please refer to AppDynamics documentation

This document assumes that the user is familiar with the configuration of HealthRules, Policies and Actions in AppDynamics. If not, please refer to Alert and Respond

4.1 Prerequisites

  1. Install the AppDynamics CMDB Sync application from ServiceNow® Store
  2. Run the CMDB Sync and verify that the entities are imported into your ServiceNow® instance

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>.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
  4. Payload
    1. MIME Type: application/json
    2. In the payload text area, please copy-paste the contents of the attached file httptemplate-events-integration.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.