Skip to main content

Integrate GitLab Events with Mezmo

A how-to guide to setting up GitLab Events as an HTTP source for Mezmo Telemetry Pipelines

Updated over a week ago

You can integrate GitLab with Mezmo to send important GitLab Events directly to a Mezmo Telemetry Pipeline. This guide details how to configure a GitLab webhook to send data to a Mezmo HTTP Source.

The integration connects a specific GitLab repository to a Mezmo Pipeline. You can then view, process, and route the GitLab event data to any desired destination for alerting, event triggers, troubleshooting and more.


Before You Begin, You Will Need


Configure the Mezmo Pipeline and Source

First, you will configure a new HTTP Source in Mezmo and add it to a Telemetry Pipeline to receive data from GitLab. You can do this with a Shared Source or a Pipeline specific source.

Setup Shared Source to receive data:

  1. In the Mezmo Platform, navigate to Pipelines and select Shared Sources.

  2. Click Create a New Shared Source.

  3. Select HTTP.

  4. Enter a Name for your source, for example GitLab Test.

  5. Under Key Management, click Create New Key to generate an authorization key.

  6. Copy or save the new authorization key and the source URL. You will need both to configure the GitLab webhook.

  7. Click Update.

Setup a Pipeline to manipulate the data:

  1. Navigate to Pipelines and click New Pipeline.

  2. Enter a Name for your pipeline, for example GitLab Test Pipeline.

  3. Click Create.

  4. In the pipeline builder, add your new GitLab Test source.

  5. Click Save, then click Deploy.


Configure the GitLab Webhook

Next, you will configure a webhook in your GitLab repository to send events to your Mezmo HTTP Source whenever something important happens.

  1. In GitLab, navigate to the repository you want to integrate with Mezmo.

  2. In the left navigation, go to Settings, then select Webhooks.

  3. Click Add new webhook.

  4. Enter a Name for your webhook.

  5. In the URL field, paste the URL you grabbed from your Mezmo HTTP Source.

  6. Under ​Custom headers, add two new headers:

    1. Authorization: YOUR_KEY

    2. Content-Type: application/json

  7. Under Trigger, select the GitLab events you want to send to Mezmo. For full control, select every checkbox.

  8. Deselect Enable SSL verification.

  9. Click Add webhook.


Test and Verify the Integration

You can send a test event from GitLab to confirm the webhook is sending data to your Mezmo pipeline.

  1. In your GitLab webhook settings, scroll to the bottom and locate the Test section.

  2. Select an event to send, such as Push events. GitLab will confirm a successful delivery with a 200 response.

  3. In your Mezmo pipeline, Tap your HTTP Source to view the incoming data.

  4. You can inspect the event payload to verify that Mezmo has received the test data from GitLab.


Next Steps

After verifying the integration, you can add Processors to your Telemetry Pipeline to parse, manage, and route your GitLab data to downstream tools or even orchestrate responsive pipelines based on developer events.


On-Prem Integration

These log events are simple to grab locally using the OpenTelemetry collector or any other Agent source. From there, data can be routed into Mezmo with ease. For help, reach out to our Support team at [email protected]!

Did this answer your question?