- Creating the self monitoring project
- Deleting the self monitoring project
- Connection to Prometheus
- Taking action on Prometheus alerts
- Adding custom metrics to the self monitoring project
- Troubleshooting
GitLab self monitoring project
-
Introduced in GitLab 12.7, behind a disabled feature flag (
self_monitoring_project
). - 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.
Creating the self monitoring project
- Navigate to Admin Area > Settings > Metrics and profiling, and expand the Self monitoring section.
- Toggle the Create Project button on.
- Once your GitLab instance creates the project, you’ll see a link to the project in the text above the Create Project toggle. You can also find it under Projects > Your projects.
Deleting the self monitoring project
- Navigate to Admin Area > Settings > Metrics and profiling, and expand the Self monitoring section.
- Toggle the Create Project button off.
- In the confirmation dialog that opens, click Delete project. It can take a few seconds for it to be deleted.
- 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:
- Duplicating the default dashboard.
- Editing the newly created dashboard file and configuring it with dashboard YAML properties.
Troubleshooting
Getting error message in logs: Could not create instance administrators group. Errors: ["You don’t have permission to create groups."]
There is a bug which causes project creation to fail with the following error (which appears in the log file) when the first admin user is an external user:
Could not create instance administrators group. Errors: ["You don’t have permission to create groups."]
Run the following in a Rails console to check if the first admin user is an external user:
User.admins.active.first.external?
If this returns true, the first admin user is an external user.
If you face this issue, you can temporarily make the admin user a non-external user and then try to create the project. Once the project is created, the admin user can be changed back to an external user.
Help and feedback
If there's something you don't like about this feature
To propose functionality that GitLab does not yet offer
To further help GitLab in shaping new features
If you didn't find what you were looking for
If you want help with something very specific to your use case, and can use some community support
POST ON GITLAB FORUM
If you have problems setting up or using this feature (depending on your GitLab subscription)
REQUEST SUPPORT
To view all GitLab tiers and features or to upgrade
If you want to try all features available in GitLab.com
If you want to try all features available in GitLab self-managed
If you spot an error or a need for improvement and would like to fix it yourself in a merge request
EDIT THIS PAGE
If you would like to suggest an improvement to this doc