mirror of
https://github.com/prometheus-community/json_exporter
synced 2024-12-17 20:04:55 +00:00
35abd4a5ea
* Update README.md Updating a few configs/commands to be able to run the example on macOS Signed-off-by: Vickie <vicky.liu.61@gmail.com> * Minimize documentation changes Signed-off-by: rustyclock <rustyclock@protonmail.com> Signed-off-by: Vickie <vicky.liu.61@gmail.com> Signed-off-by: rustyclock <rustyclock@protonmail.com> Co-authored-by: rustyclock <rustyclock@protonmail.com>
35 lines
1.1 KiB
YAML
35 lines
1.1 KiB
YAML
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"
|
|
|