Skip to content

Commit

Permalink
feat: change default port to 10019
Browse files Browse the repository at this point in the history
  • Loading branch information
janfuhrer committed Jun 25, 2024
1 parent c25dbc4 commit 8f061cf
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 18 deletions.
6 changes: 0 additions & 6 deletions .dockerignore

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ You can use the following flags to configure the exporter. All flags can also be
| `pbs.timeout` | `PBS_TIMEOUT` | Timeout for requests to Proxmox Backup Server | `5s` |
| `pbs.insecure` | `PBS_INSECURE` | Disable TLS certificate verification | `false` |
| `pbs.metrics-path` | `PBS_METRICS_PATH` | Path under which to expose metrics | `/metrics` |
| `pbs.web.listen-address` | `PBS_LISTEN_ADDRESS` | Address to listen on for web interface and telemetry | `:9101` |
| `pbs.web.listen-address` | `PBS_LISTEN_ADDRESS` | Address to listen on for web interface and telemetry | `:10019` |

### Docker secrets

Expand All @@ -78,7 +78,7 @@ The variables `PBS_API_TOKEN`, `PBS_API_TOKEN_NAME`, and `PBS_USERNAME` take pre

## Multiple Proxmox Backup Servers

If you want to monitor multiple Proxmox Backup Servers, you can use the `targets` parameter in the query string. Instead of setting the `pbs.endpoint` flag (or `PBS_ENDPOINT` env), you can use the `target` parameter in the query string to specify the Proxmox Backup Server to monitor. You would then use following URL to scrape metrics: `http://localhost:9101/metrics?target=http://10.10.10.10:8007`.
If you want to monitor multiple Proxmox Backup Servers, you can use the `targets` parameter in the query string. Instead of setting the `pbs.endpoint` flag (or `PBS_ENDPOINT` env), you can use the `target` parameter in the query string to specify the Proxmox Backup Server to monitor. You would then use following URL to scrape metrics: `http://localhost:10019/metrics?target=http://10.10.10.10:8007`.

This is useful if you are using Prometheus and want to monitor multiple Proxmox Backup Servers with one "pbs-exporter" instance.
You find examples for Prometheus static configuration in the [prometheus/static-config](prometheus/static-config) directory.
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
user: '65534'
restart: always
ports:
- "9101:9101"
- "10019:10019"
environment:
- PBS_ENDPOINT=https://pbs-server:8007
- PBS_INSECURE=false
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
user: '65534'
restart: always
ports:
- "9101:9101"
- "10019:10019"
environment:
- PBS_API_TOKEN=
- PBS_ENDPOINT=https://pbs-server:8007
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var (
"Proxmox Backup Server insecure")
metricsPath = flag.String("pbs.metrics-path", "/metrics",
"Path under which to expose metrics")
listenAddress = flag.String("pbs.listen-address", ":9101",
listenAddress = flag.String("pbs.listen-address", ":10019",
"Address on which to expose metrics")
loglevel = flag.String("pbs.loglevel", "info",
"Loglevel")
Expand Down
4 changes: 2 additions & 2 deletions prometheus/static-config/multiple-exporter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
scheme: http
static_configs:
- targets:
- 'pbs-exporter-1:9101' # PBS_ENDPOINT set to target 1
- 'pbs-exporter-2:9101' # PBS_ENDPOINT set to target 2
- 'pbs-exporter-1:10019' # PBS_ENDPOINT set to target 1
- 'pbs-exporter-2:10019' # PBS_ENDPOINT set to target 2
4 changes: 2 additions & 2 deletions prometheus/static-config/multiple-targets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# important: env PBS_ENDPOINT not set!
#
# Setup:
# - exporter instance: pbs-exporter:9101
# - exporter instance: pbs-exporter:10019
# - first PBS target: https://10.10.10.10:8007
# - second PBS target: https://10.10.10.11:8007

Expand All @@ -23,4 +23,4 @@ scrape_configs:
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: pbs-exporter:9101 # pbs-exporter address
replacement: pbs-exporter:10019 # pbs-exporter address
6 changes: 3 additions & 3 deletions prometheus/static-config/single-target.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Use Case: single Proxmox Backup Server
#
# Setup:
# - exporter instance: pbs-exporter:9101
# - exporter instance: pbs-exporter:10019
# - PBS target set in env PBS_ENDPOINT

scrape_configs:
Expand All @@ -13,7 +13,7 @@ scrape_configs:
scheme: http
static_configs:
- targets:
- 'pbs-exporter:9101' # PBS_ENDPOINT set to target
- 'pbs-exporter:10019' # PBS_ENDPOINT set to target


# example with relablings to have the host name (e.g. host-001) as metric label "instance"
Expand All @@ -33,5 +33,5 @@ scrape_configs:
target_label: instance
- source_labels: [ __address__ ]
regex: '(.*)@.*'
replacement: ${1}:9101
replacement: ${1}:10019
target_label: __address__

0 comments on commit 8f061cf

Please sign in to comment.