ServiceNow (http://www.servicenow.com) is a software-as-a-service (SaaS) provider of IT service management (ITSM) software. AppDynamics integrates directly with ServiceNow to create tickets in response to alerts. With the ServiceNow integration you can leverage your existing ticketing infrastructure to notify your operations team to resolve performance degradation issues.
Note: This extension works only with AppDynamics Health Rule Violation events.
Find the zip file at 'servicenow-api-alert.zip'.
Unzip the servicenow-api-alert.zip file into <CONTROLLER_HOME_DIR>/custom/actions/ . You should have <CONTROLLER_HOME_DIR>/custom/actions/servicenow-api-alert created.
Check if you have custom.xml file in <CONTROLLER_HOME_DIR>/custom/actions/ directory. If yes, add the following xml to the element.
<action> <type>servicenow-api-alert</type> <!-- For Linux/Unix *.sh --> <executable>servicenow-alert.sh</executable> <!-- For windows *.bat --> <!--<executable>servicenow-alert.bat</executable>--> </action>
If you don't have custom.xml already, create one with the below xml content
<custom-actions> <action> <type>servicenow-api-alert</type> <!-- For Linux/Unix *.sh --> <executable>servicenow-alert.sh</executable> <!-- For windows *.bat --> <!--<executable>servicenow-alert.bat</executable>--> </action> </custom-actions>
Uncomment the appropriate executable tag based on windows or linux/unix machine.
Make sure that you do not use tab (\t) while editing yaml files. You may want to validate the yaml file using a yaml validator http://yamllint.com/
#ServiceNow Domain domain: "https://sandbox.service-now.com" #ServiceNow User username: "admin" #ServiceNow Password, provide password or passwordEncrypted and encryptionKey. password: passwordEncrypted: "0LKLGb4hc3pAczHmzxQ5ig==" encryptionKey: "welcome123" #ServiceNow Version serviceNowVersion: "Fuji" #Close notes text to be posted when resolving the incident closeNotesText: "This incident is resolved" #Proxy server URI proxyUri: #Proxy server user name proxyUser: #Proxy server password proxyPassword: #ServiceNow User Specific #Please define your ServiceNow specific fields here like assignment_group, assigned_to, caller_id, category and location. #The name should be a valid Incident table's column name. #Do not add properties short_description, comments, impact and priority here, as they are added by the extenson automatically fields: - name: "assignment_group" value: "Capacity Mgmt" - name: "assigned_to" value: "Don Goodliffe" - name: "caller_id" value: "firstname.lastname@example.org" - name: "category" value: "request" - name: "location" value: "Denver" - name: "contact_type" value: "email"
To set passwordEncrypted in config.yaml, follow the steps below:
java -cp appd-exts-commons-1.1.2.jar com.appdynamics.extensions.crypto.Encryptor EncryptionKey CredentialToEncrypt For example: java -cp "appd-exts-commons-1.1.2.jar" com.appdynamics.extensions.crypto.Encryptor test password
Set the resulting encrypted password in passwordEncrypted field and the encryption key used in encryptionKey field in config.yaml file
|AppDynamics Parameters||ServiceNow Parameters||Comments|
|assigned_to||This is the field used to assign an incident to an individual/department. The email address or full name of the designated user can be written here. This should be entered into the params.sh file as an email address that is already configured in the ServiceNow environment.|
|description||The format is as follows for the following Policy Violation Parameters:|
|SEVERITY||impact||Represents the impact of the new Problem. Use the SEVERITY parameter where: ERROR = 1, WARN = 2, and INFO = 3|
|knowledge||This is either "true" or "false" but for policy violations, leave this as "false".|
|known_error||This is either "true" or "false" but for policy violations, leave this as "true".|
|PRIORITY||priority||This is a value from 1 to 5 where: 1 = Critical, 2 = High, 3 = Moderate, 4 = Low, 5 = Planning. The PRIORITY parameter will fill this out directly.|
When incident is created through AppDynamics it should look similar to the following screenshots. The following is an overview shot of ServiceNow:
The following shows the specifics of the ticket description:
Note: Notice that the "assigned to" field has "ITIL User" current in place here. This is taken from config.yaml.
Comments are only shown in REST API supported versions (Eureka, Fuji). In older versions (Calgary, Dublin) comments are not visible.
From version 1.4, we have added support to display comments in the Calagry and Dublin version too. To achieve this, instead of REST API we are using SOAP API to create incidents.
Always feel free to fork and contribute any changes directly via GitHub.
For any questions or feature request, please contact AppDynamics Center of Excellence.
Service Now Versions:
|Calgary, Dublin, Eureka, Fuji, Geneva|
|7 Mar 2017|
Note: This extension works only with a dedicated SaaS controller or an on-prem controller. Alerting extensions, currently do not support multi-tenant SaaS controllers.
1) Built the new extenson to support latest service now versions.
1) Made ServiceNow config parameters optional
1) Added support for password encryption
1) Code changes to support comments in JSONv2 supported versions of SNOW
1) Code changes to support comments in older versions of SNOW using SOAP API
1) Fixed log4j.xml issues
1) Fixed issue with bat file
2) Using latest appd commons and http client
1) Fixed java path issue