Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

Event collection from custom payloads

Event collection from custom payloads

The MID WebService Event Collector enables you to collect event information from custom payloads in JSON, XML, or plain text format.

Before you begin

Role required: evt_mgmt_admin

About this task

The MID Server transforms the collected event messages and populates the Event table fields (em_table) in the instance. The collection of formatted event messages is described in this procedure using basic authentication. For information about supported authentication methods, see Configure the MID Web Server extension.

The format of the required MID Server URL is: http://{MID_Server_IP}:{MID_Web_Server_Port}/api/mid/em/inbound_event?Transform={Transform_script_name}. The name of the MID Server script include is composed by appending a suffix to the default TransformEvents_ prefix. For information about the collection of JSON v2 event messages, see Configure the MID WebService Event Collector Context.

Note: The URL in the format http://{MID_Server_IP}:{MID_Web_Server_Port}/api/mid/em/{transform_script_name}is also supported.

Procedure

  1. Configure the MID WebService Event Collector, see Configure the MID WebService Event Collector Context.
  2. Start the MID WebService Event Collector.

Example

Transformation of XML formatted event messages using the custom payload URL

Assume that XML formatted event messages are sent to the MID Server. Use this example to return an array of event objects from the collected event messages. The name of the MID Server script include is composed by appending a suffix to the default TransformEvents_ prefix. For the purposes of this example, the user supplied the xmlSample script include. Using these details, the name of the MID Server script include is TransformEvents_xmlSample. The MID Server transforms the collected event messages by parsing the messages using the script include and then transmitting them to the instance.

Table 1. Data for the XML example
Field Value
MID_Server_IP 10.218.64.27
MID_Web_Server_Extension_Port 8097
transform_script_suffix _name xmlSample

Replace the variables in the URL with the values from the above table: http://10.218.64.27:8097/api/mid/em/xmlSample

Note: When copying and pasting the text below, hidden characters might also be copied and can cause unexpected results.

Example showing XML formatted event messages:

<records>
    <event>
    <source>My Source</source>
    <node>host1</node>
    <type>type1</type>
    <severity>3</severity>
    <description>Virtual memory usage exceeds 98%</description>
    </event>
    <event>
    <source>My Source</source>
    <node>host2</node>
    <type>type2</type>
    <severity>2</severity>
    <description>Virtual memory usage exceeds 90%</description>
    </event>
    </records>