> For the complete documentation index, see [llms.txt](https://docs.ilert.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ilert.com/integrations/inbound-integrations/gitlab.md).

# GitLab Integration

Feed GitLab pipeline statuses and security events into ilert to alert responders quickly and escalate problems in your CI/CD workflows.

[GitLab](https://about.gitlab.com/) is a web-based Git repository that provides free open and private repositories, issue-following capabilities, and wikis. It is a complete DevOps platform that includes CI/CD. With the GitLab integration, alerts from failed pipelines, vulnerabilities, or merge-request issues are captured and forwarded to on-call teams via ilert. This ensures engineers are alerted promptly and escalation paths activate, speeding up CI/CD issue remediation.

## In ilert: Create a GitLab alert source

1. Go to **Alerting** → **Alert sources** and click **Create new alert source**.
2. Search for **GitLab**, click its tile, and click **Next**.
3. Give your alert source a name, optionally assign teams, and click **Next**.
4. Choose who gets notified: select **Use existing escalation policy** and pick a policy, or **Generate new escalation policy** to start with a basic one that notifies you first. Click **Next**.

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Fgit-blob-8a281bf3931f5a1a531951ce97984d50989dd875%2Falert-source-escalation-step.png?alt=media" alt="The escalation step of the ilert alert source wizard, headed Who should be notified about alerts, with an escalation policy selected and a preview of its escalation rules below."><figcaption><p>Pick an existing escalation policy, or generate a basic one without leaving the wizard.</p></figcaption></figure>
5. Select **Default grouping** and click **Continue setup**. It groups events by the alert key the integration sets; the other [grouping options](/alerting/configure-alerting/alert-sources.md#event-grouping) are easier to judge once events are arriving.
6. The next page shows more settings, such as notification priority and alert templates. Click **Finish setup** for now; you can change them later.
7. On the final page, ilert shows the integration key and URL for this alert source. You will need them later in this guide.

### GitLab advanced settings

{% hint style="info" %}
This setting is optional but we still recommend enabling it for a better user experience.
{% endhint %}

1. Now click on **GitLab Settings** to show the advanced settings

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2F80kwUbRONbSkAbC5WVKe%2FScreenshot%202023-04-23%20at%2018.19.15.png?alt=media&amp;token=e525f660-a0e2-4853-9387-e1e03f41a26b" alt=""><figcaption></figcaption></figure>

2. You may now choose one of the given **Hook types** which this alert source should process. (Leaving the selection on 'Select' will result the alert source to process all incoming **Hook types**)

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Fhl2Z0BNiosSG2vsqtEtR%2FScreenshot%202023-04-23%20at%2014.57.15.png?alt=media&amp;token=fb9f2b86-b316-40af-8212-9a6820fab185" alt=""><figcaption></figcaption></figure>

3. Some **Hook types** do additionally have a selection for an **Event type**.
4. Click on **Save** to proceed to the next step.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2F8zj5jAsH8fagP79VzxeS%2FScreenshot%202023-04-23%20at%2014.57.56.png?alt=media&amp;token=2359d566-cedc-484b-934b-6403241d81d5" alt=""><figcaption></figcaption></figure>

5. On the next page a **GitLab Integration URL** is generated. You will need the URL for the webhook configuration

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2F2gAq2i5hfmSDPBAxwtR2%2FScreenshot%202023-04-23%20at%2018.13.43.png?alt=media&amp;token=177b5203-e1b6-4010-b1ba-9c320b49f0ba" alt=""><figcaption></figcaption></figure>

## In GitLab

1. From your Project Page, navigate to **"Settings"** -> **"Webhooks"**

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FH5hvmAED9cOnkpi2OOCg%2Fgitlab_settingswebhook.png?alt=media\&token=87941489-4e23-4680-8780-2400acbdf5c9)

2. Select the events that should be send to ilert, in this case any **Issues events** or **Confidential issues events** activity will be send to ilert.

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FkMGHyd336s8KfqKs5ZWS%2Fgitlab_webhookselections.png?alt=media\&token=98ec7cb3-abe4-456e-8d9b-b583025f0e37)

3. Select "**Add Webhooks**"
4. and if it is added successfully it will be shown at the bottom of the page.

![](https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Ftxn4GCA7WCTOfjaH9sHM%2Fgitlab_savewebhook.png?alt=media\&token=39b3ccf2-4773-4cc5-839e-d00d7cac5d41)

5. Your GitLab integration is set up.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ilert.com/integrations/inbound-integrations/gitlab.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
