Skip to content

Commit

Permalink
Merge pull request #33 from natrontech/chore/use-new-port
Browse files Browse the repository at this point in the history
feat: change default port to 10019
  • Loading branch information
janfuhrer authored Jun 25, 2024
2 parents c25dbc4 + 27267d3 commit f8bfd9c
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 19 deletions.
6 changes: 0 additions & 6 deletions .dockerignore

This file was deleted.

3 changes: 2 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,12 @@ signs:
release:
# allow pre-release versions (e.g. by tagging with v1.0.0-rc0)
prerelease: auto
draft: true
footer: |
**Full Changelog**: https://github.com/natrontech/{{ .ProjectName }}/compare/{{ .PreviousTag }}...{{ .Tag }}
**Docker Images**
- `ghcr.io/natrontech/{{ .ProjectName }}:{{ .Version }}`
- `ghcr.io/natrontech/{{ .ProjectName }}:v{{ .Version }}`
{{ if not .Prerelease }}- `ghcr.io/natrontech/{{ .ProjectName }}:latest`{{ end }}
# github changelog for new release
Expand Down
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 f8bfd9c

Please sign in to comment.