GitLab Content Pack

The following content pack is available for use with a Graylog Illuminate license and Graylog Enterprise or Graylog Security. Contact sales to learn more about obtaining Illuminate.

GitLab is a complete DevOps platform offering Git-based source code management, CI/CD automation, security scanning, and project collaboration. This technology pack processes GitLab logs, providing normalization and enrichment of common events of interest.

Supported Versions

  • GitLab version 17.9 and later

Requirements

  • Graylog server with valid Enterprise license running version 6.1.3 or later

  • GitLab version 17.9 or later

  • Raw HTTP input configured in Graylog for audit event streaming

Stream Configuration

This technology pack includes 1 stream:

  • "Illuminate:GitLab Messages"

Hint: If this stream does not exist prior to the activation of this pack then it is created and configured to route messages to this stream and the associated index set. There should not be any stream rules configured for this stream.

Index Set Configuration

This technology pack includes 1 index set definition:

  • "GitLab Event Log Messages"

Hint: If this index set is already defined, then nothing is changed. If this index set does not exist, then it is created with retention settings of a daily rotation and 90 days of retention. These settings can be adjusted as required after installation.

Log Collection and Delivery

GitLab audit events are delivered to Graylog via HTTP audit event streaming. A Raw HTTP input must be configured in Graylog, and GitLab must be configured to stream audit events to that input. For on-premise installations, Filebeat can be used to ship log files.

To set up log collection, complete the following procedures in order:

  • Enable the GitLab content pack

  • Create the Raw HTTP input

  • Configure GitLab audit event streaming

  • Configure input routing in Illuminate

  • Verify the setup

For more details on the input and GitLab settings, see GitLab Audit Event Streaming with Raw HTTP Input.

Enable the GitLab Content Pack

  1. Navigate to Enterprise > Illuminate > Content Hub.

  2. Search for gitlab and select GitLab.

  3. Select Enable Packs, then select Confirm.

Create the Raw HTTP Input

  1. Navigate to System > Inputs, then search for Raw HTTP and launch the new input to begin configuration.

  2. Configure the following settings:

    • Global (Checkbox): Enable this global setting by clicking the checkbox to enable the input on all Graylog nodes.

    • Title: Assign a title to the input. Example: GitLab Audit Events.

    • Bind Address and Port: Ensure GitLab can route traffic through your network to this IP address and port.

    • Enable TLS: Enable TLS on this endpoint, or route traffic through a firewall or gateway that provides TLS.

    • Enable Bulk Receiving: Select this option. GitLab sends audit events in newline-delimited batches, and this option allows the input to split each batch into individual messages.

    • Authorization Header Name and Authorization Header Value: Leave these blank for now. GitLab generates a verification token when you create the streaming destination, and you add it to the input afterward. See Secure the Input with the GitLab Verification Token.

    Keep the default values for the remaining settings unless your environment requires changes. For all available settings, see Raw HTTP Input.

  3. Set field event_source_product to GitLab-web.

Hint: The Raw HTTP input listens for HTTP requests at the /raw root path. The destination URL you enter in GitLab must end in /raw.

Configure GitLab Audit Event Streaming

In GitLab, add an HTTP streaming destination that points to the Raw HTTP input.

  1. Open the group, then select Secure > Audit events.

  2. Select the Streams tab, then select Add streaming destination > HTTP endpoint.

  3. Enter the following values:

    • Destination Name: Enter a descriptive name for the destination.

    • Destination URL: Enter the host name or IP address and port of the Graylog server running the Raw HTTP input, followed by /raw. For example: http://<graylog-host>:<port>/raw. Use https:// if TLS is enabled on the input.

    • Event Filtering (optional): Select which audit events GitLab streams to Graylog.

  4. Select Add.

Secure the Input with the GitLab Verification Token (Recommended)

GitLab includes a verification token in the X-Gitlab-Event-Streaming-Token header of every event it streams. Configure the Raw HTTP input to require this token.

  1. In GitLab, expand the streaming destination and copy the Verification token.

  2. In Graylog, navigate to System > Inputs and edit the Raw HTTP input.

  3. Set Authorization Header Name to X-Gitlab-Event-Streaming-Token and Authorization Header Value to the verification token, then save the input.

The input then rejects requests that do not include the token.

Allow GitLab to Reach a Private Network (Self-Managed GitLab Only)

If you run self-managed GitLab and Graylog is on a private network, GitLab blocks the destination with the error URL is blocked: Requests to the local network are not allowed. To allow the connection:

  1. In GitLab, navigate to Admin > Settings > Network > Outbound requests.

  2. Add the Graylog host to Local IP addresses and domain names that hooks and integrations can access.

  3. Select Save changes.

Configure Input Routing

Illuminate identifies GitLab messages by the input they arrive on. Map the Raw HTTP input ID to the GitLab content pack in the Illuminate input routing lookup.

  1. Navigate to System > Inputs and select Show received messages for the Raw HTTP input you created.

  2. Copy the gl2_source_input value from a received message. This value is the input ID.

  3. Navigate to Enterprise > Illuminate and select the Customization tab.

  4. Locate lookup_adapter_input_routing, then select Edit.

  5. Enter your custom values:

    • content_name: Enter gitlab.

    • input_id: Enter the gl2_source_input ID copied earlier.

  6. Select Configure value.

Verify the Setup

  1. Generate a GitLab audit event, for example by creating a project in the group.

  2. In Graylog, search for gl2_source_input:<input ID>.

  3. Confirm that the GitLab messages:

    • Have event_source_product set to gitlab.

    • Are routed to the Illuminate:GitLab Messages stream.

    • Include parsed fields such as vendor_event_type and user_name.

What is Provided

  • Parsing rules to extract GitLab logs into Graylog schema compatible fields

  • Graylog Information Model message categorization

  • GIM enforcement fields populated for IAM, HTTP, and detection events (service_name, application_name, event_outcome, event_action, source_reference, destination_reference)

  • Dashboards for GitLab event visualization

GIM Categorization

GIM categorization is provided for the following event types:

Event Type gim_event_type_code gim_event_category gim_event_subcategory gim_event_type
authenticated_with_* 100000 authentication authentication.logon logon
authenticated_with_two_factor, authenticated_with_webauthn 100502 authentication authentication.credential validation mfa
login_failed_with_* 100000 authentication authentication.logon logon
member_created, user_created, *_token_created (success only), deploy_key_added 110000 iam iam.object create account created
group_created 110002 iam iam.object create group created
member_destroyed, user_destroyed, *_token_revoked, deploy_key_removed 110500 iam iam.object delete account deleted
group_destroyed 110501 iam iam.object delete group deleted
member_updated, user_*_updated 111000 iam iam.object modify account modified
custom_admin_role_assigned_to_user, *_link_created 111001 iam iam.object modify privileges assigned
custom_admin_role_unassigned_from_user, *_link_removed 111002 iam iam.object modify privileges removed
password_reset_*, user_password_updated 111004 iam iam.object modify password change
group_saml_member_added 111007 iam iam.object modify group member added
ban_user, user_blocked, user_deactivate 111501 iam iam.object disable account disabled
unban_user, unblock_user, user_activate, user_approved 112001 iam iam.object enable account enabled
API/Production logs 180200 http http.communication http communication
security_policy_create/delete/update 220500 audit audit.policy audit policy changed
Vulnerability webhooks, security_policy_violations_detected 300000 detection detection.network_detection ids_detection

Fields Extracted by This Pack

Parsed Fields

These are the fields extracted and mapped by the GitLab content pack.

GitLab Spotlight Content Pack

The following dashboards are included with this content pack:

GitLab Events Overview

GitLab Events Overview dashboard image

User Overview

GitLab User Overview dashboard image

Web Overview

GitLab Web Overview dashboard image