-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathprometheus.yml
43 lines (36 loc) · 1.26 KB
/
prometheus.yml
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
42
43
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
evaluation_interval: 15s # By default, scrape targets every 15 seconds.
# NOTE: use this to validate config file
# ./promtool check config prometheus.yml
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
# A scrape configuration containing exactly one endpoint to scrape:
scrape_configs:
- job_name: 'prometheus'
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['localhost:9090']
- job_name: 'node_exporter'
# will give system metrics
static_configs:
- targets: ['localhost:9100']
- job_name: 'golang_app'
# will give application metrics
metrics_path: /metrics
# scrape_interval defines after how much time, targets will be scraped for metrics.
# scrape_timeout - Prometheus will try for 30s to scrape the metrics, if it can't scrap in this time,
# it will timeout.
# scrape_interval: 30s
# scrape_timeout: 20s
static_configs:
- targets: ['localhost:8080']