Prometheus federation, configurable external_labels
Description
Up to this point we deactivated the internal prometheus server, just activated the exporters and scraped them with our local prometheus instance. Since you keep adding more exporters (awesome, thanks!) and thinking about using the internal prometheus instance for the monitoring dashboard, we thought about just activating the internal prometheus server and scrape the whole server via the /federation endpoint.
Proposal
To avoid colliding metric names it would be awesome if you could provide a configuration flag in gitlab.rb to set external_labels
or just set a default external label (e.g. gitlab).
In gitlab.rb add for example:
prometheus['external_labels']['server'] = "gitlab-instance-1"
Which generates the following in prometheus' config:
global:
external_labels:
server: gitlab-instance-1