GitHub¶
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¶
For a repository or organization, go to Settings.
Click Webhooks and then Add
Add the Payload URL to the Observe collector using basic authentication. Replace
${OBSERVE_CUSTOMER_ID}
and${OBSERVE_TOKEN}
with your Customer ID and Ingest Token respectively.https://{OBSERVE_CUSTOMER_ID}:{OBSERVE_TOKEN}@collect.observeinc.com/v1/http
Your URL should look like this example:
https://123456789012:ab1cdE2FGhiJKlmnop34Q:rstUv5w6Xy7z8AB_CdeFg9h0iJK1mnOPqr@collect.observeinc.com/v1/http
Note
Some Observe instances may optionally use a name instead of Customer ID; if this is the case for your instance, contact your Observe Data Engineer to discuss implementation. A stem name will work as is, but a DNS redirect name may require client configuration.
Select the Content Type as
application/json
.Leave Secret blank. Observe does not use this value.
Enable SSL verification.
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 Observe Data Engineer for any out-of-the-box content to be sent to Observe.
Click Add 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:
For a repository or organization, go to Settings.
Click Webhooks.
Select the entry for the created Webhook.
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:
Log into Observe and open the corresponding source dataset associated with your Datastream in a worksheet.
Open the OPAL console and apply the following filters:
filter OBSERVATION_KIND = "http" filter (string(EXTRA.path) = "/github")
Verify that you can find GitHub events.