Integration with Servicenow
In this example we will configure dbWatch and Servicenow so that alarms from dbWatch, can create incidents in Servicenow.
To integrate the alerts from dbWatch with Servicenow incident creation, there are two parts that needs to be setup.
Configure a specific rule for Servicenow
Before we start we assume that the email extension is configured and is tested, and you are able to receive email alerts in your own inbox. There is an alert included in dbWatch, called “Test alert” that is useful for testing the alerting capabilities as the type of and frequency of alerts can be adjusted.
In order for the scripting language of Servicenow to interact with the emails in the best possible way, we need to setup the email extension with a specific rule for the Servicenow integration.
This is an example of such a setup. Its important that this rule is given a name, such as “SERVICENOW” (without the “) , that also corresponds with some formatting file names we will create later. In all the examples here we use the string “SERVICENOW”. This is also case sensitive.
What is important is that the rule name is set to “SERVICENOW” and that the receivers is set to the incoming email address of your Servicenow environment. You can apply filters if you dont want some groups, platforms etc creating incidents in Servicenow.
In addition to this, we need to setup rule specific formatting files.
They must be placed in the edited_configurations directory, example placement based on default install is: C:\Program Files\dbWatch\12.8.2\server\extensions\edited_configurations\
The files:
alert_format_subject[SERVICENOW].txt
lost_connection_format_subject[SERVICENOW].txt
reconnect_format_subject[SERVICENOW].txt
Needs to have this line of content (in bold):
*%STATUS% for ALERT on INSTANCE *
The files:
alert_format_body[SERVICENOW].txt
lost_connection_format_body[SERVICENOW].txt
reconnect_format_body[SERVICENOW].txt
Needs to have the following content (in bold):
*STATUS:STATUS
ALERTNAME:ALERT
INSTANCE_NAME:INSTANCE
GROUP:GROUP
DETAILS:%ALERT_DETAILS%*
This formats the emails so its easy to pick up the information in the scripting language in Servicenow.
Setup in Servicenow
Create a service user that can be used to map the caller:
The email address of this user should map to the email used to send dbWatch alerts, as you configured when you configured the email extension.
Then create a new inbound email action for dbWatch emails:
Note that it will only run on emails from the user we configured earlier. It also need to have an execution order lower than the common inbound email action for all emails. The name should also reflect that it is processing dbWatch alerts.
Then go to actions and insert the script for processing the data:
The updated file for formatting for email extension, and the last script for inbound email action processing is available from Github.
Post your comment on this topic.