Configure ServiceNow Connection

A ServiceNow connection securely stores reusable authentication credential and URL path information for integrations with ServiceNow.

Complete the following steps to configure a connection to ServiceNow:

  1. Identify your ServiceNow base URL
  2. Generate an Authorization header
  3. Create the ServiceNow connection from the Alert Logic console
  4. Use the connection

Identify your ServiceNow base URL

Identify your ServiceNow instance name. In the Base URL field, you must replace "<myinstance>" in the default URL provided in the Alert Logic console with the ServiceNow instance you want to target.

In the ServiceNow templated connection configuration, the Alert Logic console provides the rest of the default URL path that ServiceNow requires for ticket creation. The URL path in the templated connection is added to the base URL in the connection to define the full URL. For more information, see Configure ServiceNow Templated Connection.

Generate an Authorization header

ServiceNow requires an HTTP Authorization request header. You can use the following instructions for your operating system to generate the header.

The command requires a valid ServiceNow username and password, and it encodes the credentials with base64. To construct the header, you enter the word "Basic" (which is the Authorization header type), a space, and then the base64-encoded credentials.

Alert Logic stores your Authorization header securely when you save the connection.

To generate the header on Linux and Mac OS X:

  1. In the command line, type the following command, including the single quotation marks:

    echo -n '<username>:<password>' | base64

    where you must replace <username> and <password>  with a valid username and password for ServiceNow.

  2. Copy the following string, which you must enter in the Authorization Header field when you create the connection:

    Basic <resulting_base64_encoded_string>

If the username is "admin" and the password is "testpassword" for example, the command is:

echo -n 'admin:testpassword' | base64

and the command produces this output:

YWRtaW46dGVzdHBhc3N3b3Jk

So, in the Authorization Header field, you would paste:

Basic YWRtaW46dGVzdHBhc3N3b3Jk

To generate the header in Windows PowerShell:

  1. In the command line, type the following commands, including the quotation marks:

    $auth = [System.Text.Encoding]::UTF8.GetBytes("<username>:<password>")

    where you must replace <username> and <password> with a valid username and password for ServiceNow.

    [System.Convert]::ToBase64String($auth)

  2. Copy the following string, which you must enter in the Authorization Header field when you create the connection:

    Basic <resulting_base64_encoded_string>

If the username is "admin" and the password is "testpassword" for example, the commands are:

$auth = [System.Text.Encoding]::UTF8.GetBytes("admin:testpassword")

[System.Convert]::ToBase64String($auth)

and the command produces this output:

YWRtaW46dGVzdHBhc3N3b3Jk

So, in the Authorization Header field, you would paste:

Basic YWRtaW46dGVzdHBhc3N3b3Jk

Create the ServiceNow connection from the Alert Logic console

The next step is to create the ServiceNow connection in the Alert Logic console.

To create a ServiceNow connection:

  1. In the Alert Logic console, click the navigation menu icon (), click Configure, and then click Connections.
  2. On the Connections page, click the add icon (), and then click ServiceNow.
  3. On the Create a ServiceNow Connection page, type a descriptive name for the connectionfor example, "ServiceNow Connection".
  4. In Base URL, replace <myinstance> with the ServiceNow instance name identified earlier.
  5. In Authorization Header, paste the authorization header you generated earlier.
  6. In Custom Header(s), leave the following default HTTP headers that ServiceNow requires or customize the headers for advanced integrations.

    Accept: application/json
    Content-Type: application/json

    If you add headers, each HTTP header name-value pair must be on a separate line.

  7. Click SAVE.

Use the connection

After you save the connection, you can use it in a templated connection. For more information on templated connections, see Templated Connections Configuration Guide.

Manage connections

You can view the list of connections and edit or delete an existing one. For more information, see Manage Connections.