I have a vmagent
configuration where I can only add extra configuration options via separate files.
Let's take this file to be static, as in I can not modify this file.
I can only add my own configuration in file.yml
which looks like this.
This configuration does not work, removing metric_relabel_configs
makes the configuration work. How can I add metric_relabel_configs
from a file config?
This is the error I get.
From what you described, you basically cannot.
metric_relabel_config
is defined at the job level as documented in scrape_config section of Prometheus ; and VictoriaMetrics documents the same behavior.
So you have to have access to the scrape configuration.
It looks like a odd constraint as headers
, scheme
and metrics_path
are very common configuration points.