Hi!
On my self-hosted GitLab instance, I can monitor these metrics exposed with this URL:
https://mygitlab.com/-/metrics?token=mytoken
I have a separate external Prometheus server running, and I would like to add these metrics on it.
In the prometheus.yml
file, I added this:
- job_name: "gitlab"
metrics_path: "/-/metrics"
scheme: https
scrape_interval: "5s"
authorization:
type: Bearer
credentials: mytoken
tls_config:
insecure_skip_verify: true
static_configs:
- targets:
- "mygitlab.com"
labels:
name: "GitLab"
and restarted Prometheus.
It does not work. In the UI of Prometheus, it says ‘server returned HTTP status 404 Not Found’ for this endpoint.
Is there something wrong in my job configuration?