-
Notifications
You must be signed in to change notification settings - Fork 212
Expand file tree
/
Copy pathprometheus.yml
More file actions
49 lines (45 loc) · 1.64 KB
/
prometheus.yml
File metadata and controls
49 lines (45 loc) · 1.64 KB
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
44
45
46
47
48
49
scrape_configs:
## gather metrics of prometheus itself
- job_name: prometheus
static_configs:
- targets:
- host.docker.internal:9090 # equivalent to "localhost:9090"
## gather the metrics of json_exporter application itself
- job_name: json_exporter
static_configs:
- targets:
## Location of the json exporter's real <hostname>:<port>
- host.docker.internal:7979 # equivalent to "localhost:7979"
## gather the metrics from third party json sources, via the json exporter
- job_name: json
metrics_path: /probe
params:
module: [default]
static_configs:
- targets:
- http://host-1.foobar.com/dummy/data.json
- http://host-2:8000/other-examples/data.json
- http://localhost:8000/examples/data.json ## Used from the example steps in Readme
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
## Location of the json exporter's real <hostname>:<port>
replacement: host.docker.internal:7979 # equivalent to "localhost:7979"
## Gather metrics from transform-data JSON source using the 'transform' module
- job_name: json_transform
metrics_path: /probe
params:
module: [transform] # Use the 'transform' module
static_configs:
- targets:
- http://localhost:8000/examples/transform-data.json
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: host.docker.internal:7979 # json_exporter instance