ServiceNow: Event
- 1 Disclaimer
- 2 Version Information
- 3 Overview
- 4 Key Features
- 5 Software Requirements
- 6 Supported Actions
- 6.1 Action: Create Event
- 6.1.1 Configuration examples
- 6.1.2 Action Output
- 6.1 Action: Create Event
- 7 Input Fields
- 8 Cancelation and Rerun
- 9 Exit Codes
- 10 STDOUT and STDERR
- 11 How To
- 12 Document References
- 13 Changelog
- 13.1 ue-servicenow-event-1.1.0 (2024-08-01)
- 13.1.1 Enhancements
- 13.1.2 Changes
- 13.2 ue-servicenow-event-1.0.2 (2024-05-16)
- 13.2.1 Fixes
- 13.3 ue-servicenow-event-1.0.1 (2024-04-25)
- 13.3.1 Fixes
- 13.4 ue-servicenow-event-1.0.0 (2024-03-14)
- 13.1 ue-servicenow-event-1.1.0 (2024-08-01)
Disclaimer
Your use of this download is governed by Stonebranch’s Terms of Use.
Version Information
Template Name | Extension Name | Extension Version |
---|---|---|
ServiceNow Event | ue-servicenow-event | 1.1.0 |
Refer to Changelog for version history information.
Overview
ServiceNow is a cloud-based platform that provides a suite of IT service management (ITSM) and business process automation (BPA) tools. It is designed to help organizations streamline and automate various processes, improving efficiency and collaboration across different departments. ServiceNow Events refer to the event management functionality within the broader ServiceNow platform. This feature is designed to help organizations detect, analyze, and respond to various events in real-time.
This integration provides the capability to generate (register) an Event in ServiceNow Platform.
Key Features
Feature | Description |
---|---|
Event Registration | Capability to register an event on ServiceNow Platform with various authentication methods |
Software Requirements
This integration requires a Universal Agent and a Python runtime to execute the Universal Task.
Area | Details |
---|---|
Python Version | Requires Python 3.7 or python 3.11 |
Universal Agent | Both Windows and Linux agents are supported:
|
Universal Controller | Universal Controller Version >= 7.3.0.0. |
Network and Connectivity | Connection towards ServiceNow Endpoints is required |
ServiceNow Platform | Tested against Vancouver release. Should be compatible also with future releases if API backward compatibility is preserved |
Supported Actions
Action: Create Event
Through this action is it possible to Create (Register) an Event on ServiceNow Platform passing mandatory and optional fields.
Configuration examples
Create an event with common fields
Send an Event with some Common Fields using Basic Authentication. “Time of Event” is empty, therefore the local time of Agent will be used as event timestamp. Detailed event information is printed on Extension Output. |
Send an Event with some Common Fields using OAuth2 Authentication. |
---|
Create an event with common and additional fields
If a ServiceNow Field is defined in Additional Fields (JSON), and at the same time it is defined with a value on another existing field, the value defined on the specific designated field has precedence and the one defined on Additional Fields (JSON) will be ignored.
Send an Event with some Common and Additional Fields using Basic Authentication. “Time of Event” is empty, therefore the local time of Agent will be used as event timestamp. |
Send an Event with some Common and Additional Fields using OAuth2 Authentication. |
---|
Action Output
Output Type | Description | Example |
---|---|---|
EXTENSION | The extension output provides the following information:
| {
"exit_code": 0,
"status": "SUCCESS",
"status_description": "Task executed successfully.",
"invocation": {
"extension": "ue-servicenow-event",
"version": "1.0.0",
"fields": {...}
},
"result": {
"event_info": {
"resolution_state": "Closing",
"processing_sn_node": "",
"description": "my_description",
"source": "my_source2",
"sys_updated_on": "2023-09-25 23:06:38",
"type": "my_event_type",
"ci_identifier": "",
"sys_id": "192e633097e1711048dbf5b0f053afa8",
"sys_updated_by": "admin",
"ci_type": "",
"metric_name": "my_metric_name",
"alert": "",
"processing_notes": "",
"sys_created_on": "2023-09-25 23:06:38",
"sys_domain": {
"link": "https://dev106436.service-now.com/api/now/table/sys_user_group/global",
"value": "global"
},
"state": "Ready",
"message_key": "this is a message key",
"sys_created_by": "admin",
"time_of_event": "2023-09-26 22:47:23",
"severity": "2",
"error_msg": "",
"cmdb_ci": "",
"resource": "my_resource",
"sys_mod_count": "0",
"event_rule": "",
"classification": "0",
"sys_tags": "",
"bucket": "87",
"node": "my_node",
"processed": "",
"additional_info": "{param1=value1, param2=value2}",
"processing_duration": "",
"event_class": "my_event_class"
}
}
} {
"exit_code": 1,
"status": "FAIL",
"status_description": "<mesage description>",
"invocation": {
"extension": "ue-servicenow-event",
"version": "1.0.0",
"fields": { ... },
},
"result": {
"errors": [
"Data Validation Error: Invalid date 2024-10-10 10, must be in YYYY-MM-DD [HH:MM:SS] format"
],
}
}
|
STDOUT | Empty | Empty |
STDERR | General logging information about the state and execution of the extension |
|
Input Fields
Field | Type | Description | Introduced in Version |
---|---|---|---|
Action | Choice | The action performed upon the task execution. | 1.0.0 |
Instance URL | Text | ServiceNow URL e.g. https://dev532313.service-now.com | 1.0.0 |
Authentication Type | Choice | The Authentication Type used:
“Certificate Based Authentication” is not for public use. Please contact support if you are interested in using this option | 1.0.0 |
ServiceNow Credentials | Credentials | Credentials for "Basic" Authentication Type. The Credentials definition should be as follows.
Required then Authentication Type is “Basic” or “Oauth2 (ServiceNow API endpoint)” | 1.0.0 |
Client Credentials | Credentials | Client Credentials. The Credentials Definition should be as follows:
Required then Authentication Type is “Oauth2 (ServiceNow API endpoint)” | 1.0.0 |
Client Certificate Path | Text | Full Path of the public key certificate for SSL client-side authentication. The file must be in PEM format. Required when Authentication Type is set to “Certificate Based Authentication” | 1.0.0 |
Client Private Key Path | Text | Full Path of the private key file for SSL client-side authentication. The file must be in PEM format and not encrypted. Required when Authentication Type is set to “Certificate Based Authentication” | 1.0.0 |
Source | Text | The name of the event source type. For example, “SCOM” or “SolarWinds”. | 1.0.0 |
Event Class | Text | Specific instance of the source. For example, “SCOM 2012 on 10.20.30.40” | 1.0.0 |
Node | Text | The Node field should contain an identifier for the Host (Server/Switch/Router/etc.) that the event was triggered for. The value of the Node field can be one of the following identifiers of the Host:
If it exists in the CMDB, this value is also used to bind the event to the corresponding ServiceNow CI. | 1.0.0 |
Resource | Text | If the event refers to a device, such as, Disk, CPU, or Network Adapter, or to an application or service running on a Host, the name of the device or application must be populated in this field. For example “Disk C:\” or “Nic 001”.i | 1.0.0 |
Metric Name | Text | Name of the metric that triggered the alert. For example, “Used Memory” or “Total CPU utilization”. | 1.0.0 |
Type | Text | The type of event. This type might be similar to the Metric Name field, but is used for general grouping of event types. | 1.0.0 |
Message Key | Text | This field is used for de-duplication of events. For example, there might be two events for the same CI, where one event has CPU of 50% and the next event has CPU of 99%. Where both events must be mapped to the same ServiceNow alert, they should have the same message key. The field can be left empty. | 1.0.0 |
Additional Info | Script | This field is referencing a UAC Script in JSON key/value format, and is meant to contain any information that might be of use to the user. It does not map to a pre-defined ServiceNow event field. Examples include IDs of objects in the event source, event priority (if it is not the same as severity), assignment group information, and so on. An example of a script content is below: {
"pid": "12343",
"process_name": "servlssd",
"event_priority": "10"
}
| 1.0.0 |
Time Of Event | Text | Time when the event occurred on the event origin. The format is: yyyy-MM-dd HH:mm:ss. If left empty the the current Agent local time is used. | 1.0.0 |
Resolution State | Text | The resolution state of the Event. If left empty the state is New. Possible Values:
| 1.0.0 |
Severity | Choice | Severity of the event. Possible Values:
| 1.0.0 |
Extension Output Options | Choice | Control the Extension Ouput “results”
| 1.0.0 |
Provide Additional Fields | Choice | The Provide Additional Fields provided as Choice field. This field allows the user to choose whether to include or not additional ServiceNow fields in the request as a JSON formatted text. The following options are available.
| 1.1.0 |
Additional Fields (JSON) | Text | Additional Fields (JSON) provided as JSON formatted text. Each additional field can be sent as a key/value pair. Required when Provide Additional Fields is "As JSON Text". | 1.1.0 |
Cancelation and Rerun
In the case of Rerun, the same Event will be sent again to ServiceNow
Exit Codes
Exit Code | Status | Status Description | Meaning |
---|---|---|---|
0 | Success | “SUCCESS: Task executed successfully.“ | Successful Execution |
1 | Failure | “Execution Failed: <<Error Description>>” | Generic Error. Raised when not falling into the other Error Codes. |
2 | Failure | “Authentication Error: Account cannot be authenticated.“ | Bad credentials |
3 | Failure | “Authorization Error: Account is not authorized to perform the requested action.“ | Insufficient permissions |
20 | Failure | “Data Validation Error: <<Error Description>>“ | Input fields validation error. |
STDOUT and STDERR
STDOUT and STDERR provide additional information to User. The populated content can be changed in future versions without notice. Backward compatibility is not guaranteed.
How To
Import Universal Template
To use the Universal Template, you first must perform the following steps.
This Universal Task requires the Resolvable Credentials feature. Check that the Resolvable Credentials Permitted system property has been set to true.
To import the Universal Template into your Controller, follow these instructions.
When the files have been imported successfully, refresh the Universal Templates list; the Universal Template will appear on the list.
Modifications of this integration, applied by users or customers, before or after import, might affect the supportability of this integration. For more information refer to Integration Modifications.
Configure Universal Task
For a new Universal Task, create a new task, and enter the required input fields.
Integration Modifications
Modifications applied by users or customers, before or after import, might affect the supportability of this integration. The following modifications are discouraged to retain the support level as applied for this integration.
Python code modifications should not be done.
Template Modifications
General Section
"Name", "Extension", "Variable Prefix", "Icon" should not be changed.
Universal Template Details Section
"Template Type", "Agent Type", "Send Extension Variables", "Always Cancel on Force Finish" should not be changed.
Result Processing Defaults Section
Success and Failure Exit codes should not be changed.
Success and Failure Output processing should not be changed.
Fields Restriction Section
The setup of the template does not impose any restrictions, However with respect to "Exit Code Processing Fields" section.Success/Failure exit codes need to be respected.
In principle, as STDERR and STDOUT outputs can change in follow-up releases of this integration, they should not be considered as a reliable source for determining success or failure of a task.
Event Template configuration when related to “Metric Label Attributes” & “Optional Metric Labels” is allowed. However, administrators should be cautious of high cardinality scenarios that might occur.
Users and customers are encouraged to report defects, or feature requests at Stonebranch Support Desk.
Document References
This document references the following documents:
Document Link | Description |
---|---|
User documentation for creating, working with and understanding Universal Templates and Integrations. | |
User documentation for creating Universal Tasks in the Universal Controller user interface. |
Changelog
ue-servicenow-event-1.1.0 (2024-08-01)
Enhancements
Added support for all ServiceNow Event fields.
Changes
This integration is no longer importable on Universal Controller 7.2 or runnable on Agent version 7.2.
ue-servicenow-event-1.0.2 (2024-05-16)
Fixes
Fixed
: Fixedmessage_key
always beingNULL
(118251/#36755)
ue-servicenow-event-1.0.1 (2024-04-25)
Fixes
Fixed
: Fixed bug where the contents of theadditional_info
field were not being properly recognized by ServiceNow (118066/#36165)
ue-servicenow-event-1.0.0 (2024-03-14)
Initial Version