[修改]修改了时间配置的变量对应,添加了supervisor启动配置,增加了Prometheus对应的confd模版
This commit is contained in:
8
docker/prometheus/confd/conf.d/prometheus.toml
Normal file
8
docker/prometheus/confd/conf.d/prometheus.toml
Normal file
@@ -0,0 +1,8 @@
|
||||
[template]
|
||||
src = "prometheus.tmpl"
|
||||
dest = "/prometheus.yml"
|
||||
keys = [
|
||||
"/time/",
|
||||
]a
|
||||
|
||||
|
||||
6
docker/prometheus/confd/confd.toml
Normal file
6
docker/prometheus/confd/confd.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
backend = "etcd"
|
||||
nodes = [
|
||||
"http://etcd:2379",
|
||||
]
|
||||
watch = true
|
||||
|
||||
13
docker/prometheus/confd/templates/prometheus.tmpl
Normal file
13
docker/prometheus/confd/templates/prometheus.tmpl
Normal file
@@ -0,0 +1,13 @@
|
||||
global:
|
||||
scrape_interval: {{ getv "/time/global_scrape_interval" }}
|
||||
|
||||
scrape_configs:
|
||||
- job_name: 'node_exporter'
|
||||
scrape_interval: {{ getv "/time/node_exporter_scrape_interval" }}
|
||||
static_configs:
|
||||
- targets: [ 'node-exporter:9100' ]
|
||||
|
||||
- job_name: 'opcua_exporter'
|
||||
scrape_interval: {{ getv "/time/opcua_scrape_interval" }}
|
||||
static_configs:
|
||||
- targets: [ 'opcua-exporter:8191' ]
|
||||
Reference in New Issue
Block a user