Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.

Event collection using script

Log in to subscribe to topics and get notified when content changes.

Event collection using script

You can create a scripted integration with Event Management to push external events from monitoring tools. You can use the cURL command-line tool to send one or more events to a ServiceNow instance.

Before you begin

For Mac, cURL is automatically available.

For Unix, Linux, or Windows, make sure that the cURL command-line tool is installed. You can download it at

Role required: evt_mgmt_integration

About this task

For scripted integration, no configuration is required. If your monitoring tool is a supported event source, you can instead select a connector and configure an instance to pull events using a MID Server. In either case, the system uses a web service API to add events to the Event [em_event] table, see Event collection to MID Server using web service API.


  1. Use a text editor to create a shell (.sh) file with event records.
    curl -v -H "Accept: application/json" -H "Content-Type: application/json" -X POST --data "{
        [ {
             \"source\" : \"Simulated\",
            \"node\" : \"nameofnode\",
            \"type\" : \"High Virtual Memory\",
            \"resource\" : \"C:\",
            \"severity\" : \"5\",
            \"description\" : \"Virtual memory usage exceeds 98%\",
           \"additional_info\":\"{\\\"name\\\":\\\"My Airlines\\\"}\"
          \"source\" : \"Simulated\",
          \"node\" : \"\",
          \"type\" : \"High CPU Utilization\",
          \"resource\" : \"D:\",
          \"severity\" : \"5\",
          \"description\" : \"CPU on at 60%\"
    }" -u myUserID:myPassword https://<my-instance>
  2. Use the -H option. For the POST parameter, start the data block with an open bracket and delimit the data with backslashes. For example:
    POST --data "{\"records\":[{\"source\" :  [. . .]}"
    Table 1. Header parameters for use with -H option
    Parameter Type Description
    Accept String The acceptable type for this message.

    The default value is application/json.

    Content-Type String The content type for this message.

    The default value is application/json.

    POST String The request type is POST with one or more trailing records.
  3. Use the -u option and the instance URL with login credentials. For example:
     -u myUserID:myPassword "https://<my-instance>
  4. Test the scripted integration.