GitHub allows for the creation of webhook triggers at the organization, repository, or application level. Further details regarding the specifics of available GitHub parameters is detailed in the GitHub Webhook Documentation.

To create a GitHub webhook to send events to Observe, you need the following items:

  • A GitHub account and organization or repository

  • An Observe datastream token

Setting Up the Webhook

  1. For a repository or organization, go to Settings.

  2. Click Webhooks and then Add

  3. Add the Payload URL to the Observe collector using basic authentication. Replace CUSTOMER_ID and TOKEN with your Customer ID and Ingest Token respectively.

Your URL should look like this example:

  1. Select the Content Type as application/json.

  2. Leave Secret blank. Observe does not use this value.

  3. Enable SSL verification.

  4. Select the type of events you want to trigger the Webhook. Typically, you want to select Just the push event. Be sure to check with your Data Engineer for any out-of-the-box content to be sent to Observe.

  5. Click Add Webhook.

Configuring a GitHub Webhook

Figure 1 - Configuring a GitHub Webhook

Verifying GitHub Data Ingestion

Validate the configuration in two places:

  • Check that GitHub successfully sends the data.

  • Check that Observe receives data.

To verify that GitHub sends data to Observe, perform the following steps:

  1. For a repository or organization, go to Settings.

  2. Click Webhooks.

  3. Select the entry for the created Webhook.

  4. Click the Recent Deliveries tab and review recent calls that received a 202 response code.

To verify that you receive data into Observe, perform the following steps:

  1. Log into Observe and open the corresponding source dataset associated with your Datastream in a worksheet.

  2. Open the OPAL console and apply the following filters:

    filter OBSERVATION_KIND = "http"
    filter (string(EXTRA.path) = "/github")
  3. Verify that you can find GitHub events.