Misleading warning during/after GitLab upgrade (<=11) - Prometheus 1.x being deprecated
Problem to solve
During/after upgrading GitLab (v <=11) the admin receives a warning:
== Prometheus ==
Detected Prometheus version 1.x. Version 1.x has been deprecated and support will be removed in GitLab version 12.0.
To upgrade to Prometheus 2.x, use `gitlab-ctl prometheus-upgrade` command.
Running this command will migrate all your existing data to format supported by Prometheus 2.x.
This can be a time consuming operation. To skip migrating the data, and instead remove and start fresh, run `gitlab-ctl prometheus-upgrade --skip-data-migration`.
Check https://docs.gitlab.com/omnibus/update/gitlab_11_changes.html#114 for details.
This can be misunderstood as something that has to be done by the admin manually, eventually ending in unnecessary manual steps and consequentially falling into another troubles like Prometheus data migration running longer than 8 hours (where the migration might not be needed), etc.
Feel free to check a customer issue in ZenDesk 138553 - Internal ticket
Suggested solution
In the Notification replace
To upgrade to Prometheus 2.x, use `gitlab-ctl prometheus-upgrade` command.
Running this command will migrate all your existing data to format supported by Prometheus 2.x.
This can be a time consuming operation.
To skip migrating the data, and instead remove and start fresh, run `gitlab-ctl prometheus-upgrade --skip-data-migration`.
Check https://docs.gitlab.com/omnibus/update/gitlab_11_changes.html#114 for details.
by
Upgrading GitLab to >=12.0, will automatically upgrade Prometheus to 2.x. But Prometheus 1.x data will not be migrated.
The command `gitlab-ctl prometheus-upgrade` can be used in case it is needed to migrate Prometheus to 2.x (incl. the data) before upgrading GitLab to >=12.0.
Be aware, the data migration performed by `gitlab-ctl prometheus-upgrade` can be a time consuming operation.
To skip migrating the data, and instead remove and start fresh, run `gitlab-ctl prometheus-upgrade --skip-data-migration`.
Check https://docs.gitlab.com/omnibus/update/gitlab_11_changes.html#114 for details.
Edited by Vladimír Brodský