GitLab self monitoring project

  • Introduced behind a disabled feature flag (self_monitoring_project) in GitLab 12.7.
  • The feature flag was removed and the Self Monitoring Project was made generally available in GitLab 12.8.

GitLab has been adding the ability for administrators to see insights into the health of their GitLab instance. In order to surface this experience in a native way, similar to how you would interact with an application deployed via GitLab, a base project called “GitLab self monitoring” with internal visibility will be added under a group called “GitLab Instance Administrators” specifically created for visualizing and configuring the monitoring of your GitLab instance.

All administrators at the time of creation of the project and group will be added as maintainers of the group and project, and as an admin, you’ll be able to add new members to the group in order to give them maintainer access to the project.

This project will be used for self monitoring your GitLab instance.

Activating the self monitoring project

  1. Navigate to Admin Area > Settings > Metrics and profiling, and expand the Self monitoring section.
  2. Toggle the Create Project button on.
  3. It can take a few seconds for the project to be created. After the project is created, GitLab displays a message with a link to the project. The project will also be linked in the help text above the Create Project button. You can also find the project under Projects > Your projects.

Deactivating the self monitoring project

Warning: If you deactivate the self monitoring project, it will be permanently deleted.
  1. Navigate to Admin Area > Settings > Metrics and profiling, and expand the Self monitoring section.
  2. Toggle the Create Project button off.
  3. In the confirmation dialog that opens, click Delete project. It can take a few seconds for it to be deleted.
  4. After the project is deleted, GitLab displays a message confirming your action.

Connection to Prometheus

The project will be automatically configured to connect to the internal Prometheus instance if the Prometheus instance is present (should be the case if GitLab was installed via Omnibus and you haven’t disabled it).

If that’s not the case or if you have an external Prometheus instance or an HA setup, you should configure it manually.

Taking action on Prometheus alerts

You can add a webhook to the Prometheus config in order for GitLab to receive notifications of any alerts.

Once the webhook is setup, you can take action on incoming alerts.

Adding custom metrics to the self monitoring project

You can add custom metrics in the self monitoring project by:

  1. Duplicating the default dashboard.
  2. Editing the newly created dashboard file and configuring it with dashboard YAML properties.