2020-08-04 06:37:28 +00:00
|
|
|
scrape_configs:
|
2020-10-05 02:41:28 +00:00
|
|
|
|
|
|
|
## gather metrics of prometheus itself
|
2020-08-04 06:37:28 +00:00
|
|
|
- job_name: prometheus
|
|
|
|
static_configs:
|
2020-10-05 02:41:28 +00:00
|
|
|
- targets:
|
|
|
|
- localhost:9090
|
|
|
|
|
|
|
|
## gather the metrics of json_exporter application itself
|
2020-08-04 06:37:28 +00:00
|
|
|
- job_name: json_exporter
|
2020-10-05 02:41:28 +00:00
|
|
|
static_configs:
|
|
|
|
- targets:
|
|
|
|
- localhost:7979 ## Location of the json exporter's real <hostname>:<port>
|
|
|
|
|
|
|
|
## gather the metrics from third party json sources, via the json exporter
|
|
|
|
- job_name: json
|
2020-08-04 06:37:28 +00:00
|
|
|
metrics_path: /probe
|
|
|
|
static_configs:
|
2020-10-05 02:41:28 +00:00
|
|
|
- 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
|
2020-08-04 06:37:28 +00:00
|
|
|
relabel_configs:
|
2020-10-05 02:41:28 +00:00
|
|
|
- source_labels: [__address__]
|
|
|
|
target_label: __param_target
|
2020-08-04 06:37:28 +00:00
|
|
|
- source_labels: [__param_target]
|
2020-10-05 02:41:28 +00:00
|
|
|
target_label: instance
|
|
|
|
- target_label: __address__
|
|
|
|
replacement: localhost:7979 ## Location of the json exporter's real <hostname>:<port>
|
2020-08-04 06:37:28 +00:00
|
|
|
|