Mike I2
Giga Guru

After much trial and error, I've got this working. The main issue was incomplete and incorrect @Servicenow_1 documentation. The following steps are needed to fully complete this integration:

 

ServiceNow Configuration

  1. Create a new HTTP(S) Endpoint CI record with the URL "https://<instance_name>.service-now.com/api/sn_em_connector/em/inbound_event?source=thousandeyes"
  2. Create a service account for ThousandEyes in the sys_user table with the roles web_service_admin, and evt_mgmt_integration
  3. Create an Oauth Configuration for the ThousandEyes Push Connector
    1. Navigate to All > System OAuth > Application Registry and then select New.
    2. Select Create an OAuth API endpoint for external clients.
    3. Add the following Redirect URLs as a comma-separated list
      1. https://app.thousandeyes.com/webhooks-oauth-callback/
      2. https://app.thousandeyes.com/namespace/integrations/AuthCallbackPage.html

ThousandEyes Configuration

  1. Create an Integration: Click Integrations in the left side bar menu, then the New Integration button.
  2. Complete the form as follows:
    1. Name -  can be anything
    2. URL = Endpoint URL from the HTTP(S) Endpoint CI record, e.g "https://<instance_name>.service-now.com/api/sn_em_connector/em/inbound_event?source=thousandeyes"
    3. Preset Configurations = Generic
    4. Auth Type = OAuth Code
      1. Auth URL = https://<instance_name>.service-now.com/oauth_auth.do
      2. Token URL = https://<instance_name>.service-now.com/oauth_token.do
      3. Client ID = copied from Oauth Configuration
      4. Client Secret = copied from Oauth Configuration
    5. Click Get Token. This will open a ServiceNow login page. Enter the credential for the service account created in a previous step. 
    6. Click Login, then click Allow
    7. You will be redirected back to the previous page. Click Save to save the custom webhook configuration
    8. Check in ServiceNow logs for a log entry confirmation:
      1. source = OAUTH_SERVER
      2. level = Information
      3. message similar to "OAuth token(s) of access_token refresh_token is/are granted to app:ThousandEyes;grant_type:authorization_code;user:thousandeyes"
    9. Back in ThousandEyes Integration window, click the custom webhook, status = Untested, to open it.
    10. Click Test
    11. Wait for the following message
    12. MikeI2_1-1692092800296.png
    13. Click Save again Webhook status should now be Connected. The integration is now complete 
       
    14. Create a test - Alerts > Alert Rules in the left hand side bar menu. 
    15. Select any rule
    16. MikeI2_2-1692092998944.png

       

    17. Click Notification. 
    18. Under Webhooks, click Edit webhooks. 
    19. Click Add New Webhook
      1. Auth Type = Oauth
      2. Name = can be anything
      3. URL = Endpoint URL from the HTTP(S) Endpoint CI record, e.g "https://<instance_name>.service-now.com/api/sn_em_connector/em/inbound_event?source=thousandeyes"
      4. Grant Type = Implicit
      5. Auth URL = https://<instance_name>.service-now.com/oauth_auth.do
      6. Client ID = copied from Oauth Configuration
      7. Click Get Token. This will open a ServiceNow login page. Enter the credential for the service account created in a previous step. 
      8. Click Login, then click Allow
      9. You will be redirected back to previous ThousandEyes window. Wait for "Token retrieved successfully" confirmation
      10. Click Test. Wait for "Webhook test completed successfully" confirmation.
      11. Click Save Webhook. 
      12. This will have created a test Event in Servicenow:
      13. Open Servicenow. Open All Events. Look for an event with event source = ThousandEyes, Description = WEBHOOK_TEST, e.g 
      14. MikeI2_0-1692094003037.png

         

    20. The configuration is now complete. The integration and webhook are now connected to your ServiceNow instance, and Event Management can now be configured to process incoming events from ThousandEyes. 

 

View solution in original post