Add a ScrapeConfig for gitaly metrics using GCE discovery
Split from #2680 (closed)
As part of our goal to scrape the same Prometheus jobs that the VMs do from the Prometheus remote agents. On this particular issue will be focus in on the gitaly metrics - prometheus job
Original configuration in chef for the job, (see chef role https://gitlab.com/gitlab-com/gl-infra/chef-repo/-/blob/master/roles/gprd-infra-prometheus-server.json)
"gitaly": {
"chef_search": "roles:gprd-base-stor-gitaly-common NOT roles:gprd-base-stor-gitaly-packer",
"exporter_port": "9236",
"file_inventory": true
},
This issue will be about add the relevant ScrapeConfig using the GCE discovery to scrape the gitaly metrics across all VM's that have the chef role `gprd-base-stor-gitaly-common NOT roles:gprd-base-stor-gitaly-packer". If my understanding is correct, that will be map to the service label: gitaly.
At the moment, there is not a clear place to write this scrape configuration, I will follow up with a ticket that will allow us to give home to this and other similar configurations.You can add the relevant configuration to the helm chart https://gitlab.com/gitlab-com/gl-infra/charts/-/tree/main/gitlab/prometheus-agent