GitHub

Github allows for the creation of webhook triggers at the organization, repository or application level. Further details regarding the specifics of what GitHub has available is detailed in their 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 repo 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.

    https://CUSTOMER_ID:[email protected]/v1/http

Your URL should look like this example:

https://123456789012:ab1cdE2FGhiJKlmnop34Q:[email protected]/v1/http

  1. Select the Content Type to 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 Observe ingests GitHub data

Validate the configuration in two places:

  • Check GitHub successfully sends the data.

  • Check Observe for received data.

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

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

  2. Click Webhooks.

  3. Click the entry for the created webhook.

    1. Click the Recent Deliveries tab and check the recent calls that received a 202 response code.

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

  1. Log into Observe and open the corresponding Observation event stream 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.