- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2023 06:28 AM - edited 08-11-2023 02:27 AM
Hi all,
I'm trying to connect ThousandEyes to my client's instance. I've worked through SN and ThousandEyes doc's pages, and can successfully retrieve a token, however whilst trying to test the webhook in ThousandEyes by sending a test event, we're getting a 403 Forbidden error with just the following log entry immediately after each test attempt. Has anyone had a similar issue?
09/08/2023 13:58:32 | Error | DxC_ML: look up window size = 0, it should be positive: no thrown error | com.glide.ui.ServletErrorListener |
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2023 03:09 AM
After much trial and error, I've got this working. The main issue was incomplete and incorrect @Servicenow documentation. The following steps are needed to fully complete this integration:
ServiceNow Configuration
- 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"
- Create a service account for ThousandEyes in the sys_user table with the roles web_service_admin, and evt_mgmt_integration
- Create an Oauth Configuration for the ThousandEyes Push Connector
- Navigate to All > System OAuth > Application Registry and then select New.
- Select Create an OAuth API endpoint for external clients.
- Add the following Redirect URLs as a comma-separated list
ThousandEyes Configuration
- Create an Integration: Click Integrations in the left side bar menu, then the New Integration button.
- Complete the form as follows:
- Name - can be anything
- 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"
- Preset Configurations = Generic
- Auth Type = OAuth Code
- Auth URL = https://<instance_name>.service-now.com/oauth_auth.do
- Token URL = https://<instance_name>.service-now.com/oauth_token.do
- Client ID = copied from Oauth Configuration
- Client Secret = copied from Oauth Configuration
- Click Get Token. This will open a ServiceNow login page. Enter the credential for the service account created in a previous step.
- Click Login, then click Allow
- You will be redirected back to the previous page. Click Save to save the custom webhook configuration
- Check in ServiceNow logs for a log entry confirmation:
- source = OAUTH_SERVER
- level = Information
- message similar to "OAuth token(s) of access_token refresh_token is/are granted to app:ThousandEyes;grant_type:authorization_code;user:thousandeyes"
- Back in ThousandEyes Integration window, click the custom webhook, status = Untested, to open it.
- Click Test
- Wait for the following message
- Click Save again Webhook status should now be Connected. The integration is now complete
- Create a test - Alerts > Alert Rules in the left hand side bar menu.
- Select any rule
- Click Notification.
- Under Webhooks, click Edit webhooks.
- Click Add New Webhook
- Auth Type = Oauth
- Name = can be anything
- 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"
- Grant Type = Implicit
- Auth URL = https://<instance_name>.service-now.com/oauth_auth.do
- Client ID = copied from Oauth Configuration
- Click Get Token. This will open a ServiceNow login page. Enter the credential for the service account created in a previous step.
- Click Login, then click Allow
- You will be redirected back to previous ThousandEyes window. Wait for "Token retrieved successfully" confirmation
- Click Test. Wait for "Webhook test completed successfully" confirmation.
- Click Save Webhook.
- This will have created a test Event in Servicenow:
- Open Servicenow. Open All Events. Look for an event with event source = ThousandEyes, Description = WEBHOOK_TEST, e.g
- 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2023 03:09 AM
After much trial and error, I've got this working. The main issue was incomplete and incorrect @Servicenow documentation. The following steps are needed to fully complete this integration:
ServiceNow Configuration
- 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"
- Create a service account for ThousandEyes in the sys_user table with the roles web_service_admin, and evt_mgmt_integration
- Create an Oauth Configuration for the ThousandEyes Push Connector
- Navigate to All > System OAuth > Application Registry and then select New.
- Select Create an OAuth API endpoint for external clients.
- Add the following Redirect URLs as a comma-separated list
ThousandEyes Configuration
- Create an Integration: Click Integrations in the left side bar menu, then the New Integration button.
- Complete the form as follows:
- Name - can be anything
- 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"
- Preset Configurations = Generic
- Auth Type = OAuth Code
- Auth URL = https://<instance_name>.service-now.com/oauth_auth.do
- Token URL = https://<instance_name>.service-now.com/oauth_token.do
- Client ID = copied from Oauth Configuration
- Client Secret = copied from Oauth Configuration
- Click Get Token. This will open a ServiceNow login page. Enter the credential for the service account created in a previous step.
- Click Login, then click Allow
- You will be redirected back to the previous page. Click Save to save the custom webhook configuration
- Check in ServiceNow logs for a log entry confirmation:
- source = OAUTH_SERVER
- level = Information
- message similar to "OAuth token(s) of access_token refresh_token is/are granted to app:ThousandEyes;grant_type:authorization_code;user:thousandeyes"
- Back in ThousandEyes Integration window, click the custom webhook, status = Untested, to open it.
- Click Test
- Wait for the following message
- Click Save again Webhook status should now be Connected. The integration is now complete
- Create a test - Alerts > Alert Rules in the left hand side bar menu.
- Select any rule
- Click Notification.
- Under Webhooks, click Edit webhooks.
- Click Add New Webhook
- Auth Type = Oauth
- Name = can be anything
- 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"
- Grant Type = Implicit
- Auth URL = https://<instance_name>.service-now.com/oauth_auth.do
- Client ID = copied from Oauth Configuration
- Click Get Token. This will open a ServiceNow login page. Enter the credential for the service account created in a previous step.
- Click Login, then click Allow
- You will be redirected back to previous ThousandEyes window. Wait for "Token retrieved successfully" confirmation
- Click Test. Wait for "Webhook test completed successfully" confirmation.
- Click Save Webhook.
- This will have created a test Event in Servicenow:
- Open Servicenow. Open All Events. Look for an event with event source = ThousandEyes, Description = WEBHOOK_TEST, e.g
- 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2024 03:12 AM
Hi Mike,
I have also configured the ServiceNow integration with ThousandEyes using custom webhook with the help of steps mentioned by you. We have also received the webhook test event but we are not receiving the events from ThousandEyes even after that. We have added the webhook to the Notifications section in ThousandEyes. Could you please help us where we can check the logs or troubleshoot on this issue.
Thanks,
Prashant Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2024 01:59 AM
Hi Prashant
Activating more logging for the sn_em_connector API might help in understanding where it goes wrong. If the Events are received by the API you can have a look at the incoming payloads.
System Property "global.cloud.event.debug" can be created and set to true.
Then you should be able to look at raw data that is coming into the API by checking the records that will be created in the "Push Connector Debugs" table [sn_em_connector_listener_debug].