Skip to content

Commit

Permalink
Add prometheus config example to readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
tetafro committed Dec 15, 2023
1 parent 7c1af08 commit 950a006
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,22 @@ curl 'http://localhost:9119/probe?target=192.168.178.1'
| `connect_box_tunner_temperature` | gauge | Tunner temperature |
| `connect_box_wan_ipv4_addr` | gauge | WAN IPv4 address |
| `connect_box_wan_ipv6_addr` | gauge | WAN IPv6 address |

## Prometheus config

Prometheus config with relabling to set the address of Connectbox instead of
the address of the Prometheus instance on collected metrics
```yaml
scrape_configs:
- job_name: connectbox
metrics_path: /probe
static_configs:
- targets: [connectbox.domain] # connectbox host or ip
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: "prometheus.domain:9119" # prometheus host or ip
```

0 comments on commit 950a006

Please sign in to comment.