ServiceNow-OMC Integration

In one of the previous post, I talked about how to integrate Oracle Enterprise Manager with ServiceNow. If you are a Oracle Management Cloud user, you would want the same functionality with OMC as well. ServiceNow connector in OEMCC is synonymous to ServiceNow channel in Oracle Management Cloud. The channel gives you the ability to automatically create/ update/ resolve or, close a ticket (incident) in ServiceNow based on the generated event and related alert rule definition. The instructions to set up alert rules and create a ServiceNow channel are illustrated well in OMC documentation. The notification channel works great with the default ServiceNow setup however, if your instance of ServiceNow is customized, you might encounter issues while creating/ updating or, resolving a ticket/ incident.

How OMC creates a ticket in ServiceNow?

Before we jump into what can be done for a successful ticket creation and subsequent update, let us understand how Oracle Management Cloud creates a ticket in ServiceNow.

OMC’s notification channels uses what they call a “payload”. It is similar to the ticket template used by Oracle Enterprise Manager Cloud Control however, unlike OEMCC, you can only interact with the OMC console and not the underlying code or, xml.
The payload has pre-defined mapping between the fields of generated event and columns of “incident” table in ServiceNow. When a new notification channel is created, the default payload is used to attempt a ticket creation/ update or, resolution which inserts/ updates records in the following columns of incident table in ServiceNow.

  • impact, urgency: Determines the priority of the incident (default: Priority 2)
  • short_description: Short description of the incident (default: Alert Message)
  • description: Detailed description of the incident (default: Alert Message)
  • comments: Comments for customers in the incident (default: Event details and alert message)
  • state: State of the incident (default: New)
  • close_code: Close code of the incident (default: Solved (Work Around))
  • close_notes: Closure notes of the incident (default: Management Cloud Resolution)

For OMC to automatically manage incidents in customized instance of ServiceNow, it is required to use a “customized payload”.

Customizing ServiceNow payload

If you are here, I assume that alert rules have been successfully setup and events/ alerts are getting generated in OMC. Before we jump on to customizing the payload, please contact your ServiceNow administrator and get a list of mandatory fields/ columns from incident table. If you are using a customized instance of ServiceNow, it is very likely that there are custom fields which need to be populated and the exact names are referenced in the ServiceNow payload. Once determined, let us customize the payload for ServiceNow notification channel.

Login to OMC Console and navigate to Administration –> Notification Channels.

If a new ServiceNow notification channel has to be created, click on the “Create Notification Channel” on the top-right corner else, click on an existing ServiceNow notification channel available from the list.

Create ServiceNow Channel

On the Edit/ Create ServiceNow Channel window, click on “Use Custom Payload”.

  • In the first field, provide the name of ServiceNow column/ field.
  • The second field, provide the value with which the field will be populated.
  • In the third field, select whether this will be used by OMC during an incident creation or, update.
  • Click on the “+” sign to add the pair.
Customize ServiceNow payload

A few useful tips:

  • Fields like description, short_description, urgency, impact etc are only required to be used when an alert is created.
  • Set the state to 6 to resolve an incident when the alert clears. Refer to the below tables to set appropriate values for incident state field.
TableElementValueLabel
incidentincident_state1New
incidentincident_state2Active
incidentincident_state3Awaiting Problem
incidentincident_state4Awaiting User Info
incidentincident_state5Awaiting Vendor
incidentincident_state-5Pending
incidentincident_state6Resolved
incidentincident_state7Closed
incidentincident_state8Canceled
ServiceNow Out-of-box incident state mapping
  • Fields like comments, can be used when an alert is updated and when an alert is cleared. You can use the below template to populate comments field with details:
<pre class="wp-block-syntaxhighlighter-code">${'<div style=\"padding:0 1em\"><dl style=\"padding-left:1em\"><dt>Alert ID:</dt><dd><a href=\"'alert.detailUiUrl'\" target=\"_blank\">'alert.id'</a></dd><dt>Event Name:</dt><dd>'alert.eventName'</dd><dt>Event Message:</dt><dd>'alert.message'</dd><dt>Entity Name:</dt><dd>'entity.name'</dd><dt>Entity ID:</dt><dd>'entity.id'</dd><dt>OMC Severity:</dt><dd>'alert.severity'</dd><dt>Rule:</dt><dd>'rule.ruleName'</dd><dt>Note:</dt><dd>'rule.note.text'</dd><dt>Generated On:</dt><dd>'alert.time'</dd></dl><h4>Updated by OMC</h4></div>'}</pre>

Once all the required fields are filled, Click on Create/ Edit on the bottom left-hand on the window to save the customized payload for your ServiceNow connector. If all the required fields are added, you should be able to see incidents being successfully created/ updated/ resolved.

Let me know in the comments section in case you encounter an issue and I would be happy to help!