support include params
Opened this issue · 3 comments
can support include params
in my case
scrape_configs:
- job_name: "test"
honor_labels: true
file_sd_configs:
- refresh_interval: 1m
files:
- "/etc/prometheus/myconfig/*.yml"
I want use config file like this , can prometheus-proxy support it ?
for example
agent {
pathConfigs: [
some_path_A,
some_path_B,
]
}
I am not sure what you are asking. Can you give me a few more details?
Thanks,
Paul
I don't want every single metric to be a job, I want a class of metric to be a job, and I want configuration files to be classified by different files
example
I have many exporter config,
- node-exporter-targets.json
- process-exporter-targets.json
- ...
each exporter is a json file include many target
node-exporter-targets.json
{
name: "node-exporter"
path: type_a_metrics
url: "http://app1.local:9100/metrics"
},
{
name: "node-exporter"
path: type_a_metrics
url: "http://app2.local:9100/metrics"
},
{
name: "node-exporter"
path: type_a_metrics
url: "http://app3.local:9100/metrics"
}
process-exporter-targets.json
{
name: "process-exporter"
path: type_b_metrics
url: "http://app1.local:9256/metrics"
},
{
name: "process-exporter"
path: type_b_metrics
url: "http://app2.local:9256/metrics"
},
{
name: "process-exporter"
path: type_b_metrics
url: "http://app3.local:9256/metrics"
}
I expect prometheus-proxy can be configured like the example below
agent {
pathConfigs: [
node-exporter-targets.json,
process-exporter-targets.json
]
}
and prometheus config will be as below
scrape_configs:
- job_name: 'node-exporter'
metrics_path: '/type_a_metrics'
static_configs:
- targets: [ 'mymachine.local:8080' ]
- job_name: 'process-exporter'
metrics_path: '/type_b_metrics
basic_auth:
username: 'user'
password: 's3cr3t'
static_configs:
- targets: [ 'mymachine.local:8080' ]
Sorry for taking so long to get back to you on this. I have been busy with something.
Does this summarize your request: you want to be able to embed filenames for the pathConfigs values in a conf file?