prometheus-community/stackdriver_exporter

[feature request] add ability to configure projects/prefixes in yaml file

WojciechKuk opened this issue · 3 comments

I have ~250 different GCP projects, with different needs. In some projects I just only need to scrape Composer metrics, in the other projects I need to scrape only BigQuery metrics, or only Compute metrics. Sometimes I need to scrape i.e. Composer+Bigquery, or Compute+Loadbalancing metrics.

I don't want to scrape all the metrics just to catch few metrics that I need in a particular projects. This is cost inefficient (pay per request) and results in throttling by GCP (by the way caused by uncontrollable parallelism).

My workaround is to run simultaneously many exporters with different command line parameters - but it's difficult to maintain.

Is it possible to add ability to configure stackdriver_exporter using .yml file? i.e.

project1-prod: 
  - composer.googleapis.com
project2-prod:
  - composer.googleapis.com
  - bigquery.googleapis.com
project3-prod:
  - bigquery.googleapis.com
  - compute.googleapis.com

This is unnecessary because the exporter supports selecting different data via the collect param. Similar to how node_exporter and other modular exporters work.

AFAIK with collect param I can't achieve such setup with project+prefixes pairs.
collect is related only to prefixes - not to projects.

additionally, with such yaml file, will be simplier (in future) to i.e. add ability to use different SA/keys for different projects, using ONE stackdriver_exporter instance.