-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathprometheus.yml.tmpl
41 lines (37 loc) · 981 Bytes
/
prometheus.yml.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
global:
scrape_interval: {{.scrapeInterval}}
scrape_timeout: {{.scrapeTimeout}}
evaluation_interval: {{.evaluationInterval}}
rule_files:
- /rules.yml
- /etc/prometheus/rules-l1.yml
- /etc/prometheus/rules-ln.yml
$ALERT_RULES_FILE
scrape_configs:
- job_name: 'prometheus'
metric_relabel_configs:
- source_labels: ["__name__"]
regex: "prometheus_.*"
target_label: "instance"
replacement: "{{.prometheusServer}}"
static_configs:
- targets: ['localhost:9090']
{{$scheme := .scheme}}
{{$tlsInsecure := .tlsInsecure}}
{{$scrapeMatch := .scrapeMatch}}
{{range .scrapePaths}}
- job_name: '{{.}}'
metrics_path: {{.}}
scheme: {{$scheme}}
tls_config:
insecure_skip_verify: {{$tlsInsecure}}
{{if not (eq $scrapeMatch "")}}
params:
'match[]':
- '{job=~"{{$scrapeMatch}}"}'
- '{__name__=~"dependency_up|up"}'
{{end}}
file_sd_configs:
- files:
- /servers.json
{{end}}