Skip to content

Instantly share code, notes, and snippets.

@m4r10k
Created April 3, 2022 16:50
Show Gist options
  • Save m4r10k/36081b4bae69a162fc4fd6447da04bdb to your computer and use it in GitHub Desktop.
Save m4r10k/36081b4bae69a162fc4fd6447da04bdb to your computer and use it in GitHub Desktop.
scrape_configs:
## gather metrics of prometheus itself
- job_name: prometheus
static_configs:
- targets:
- localhost:9090
## gather the metrics of json_exporter application itself
- job_name: json_exporter
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
scrape_interval: 15s
metrics_path: /probe
static_configs:
- targets:
- http://<yourip>/solar_api/v1/GetPowerFlowRealtimeData.fcgi
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: localhost:7979 ## Location of the json exporter's real <hostname>:<port>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment