Repository navigation
change: proxy node endpoints through single nginx - #85
Merged
Merged
Conversation
0xB10C
force-pushed
the
2026-02-proxy-node-ports-through-nginx
branch
5 times, most recently
from
February 9, 2026 13:23
a62add7 to
0e42027
Compare
0xB10C
marked this pull request as ready for review
February 9, 2026 13:23
0xB10C
force-pushed
the
2026-02-proxy-node-ports-through-nginx
branch
from
February 9, 2026 13:25
0e42027 to
e3c6cc9
Compare
Collaborator
Author
|
The mapping is now:
(note that this is subject to change) |
We proxy all node endpoints that were previously exposed separatly through one nginx proxied endpoint. This has two benefits: 1. We can enable gzip compression for all metrics which reduces the bandwidth between hosts 2. We can limit what access webservers have on the e.g. node-exporters of the nodes. The webserver has way too much access via the `/debug` endpoint on the node-exporter. This is not needed and not wanted. The mapping is now: - `<wireguard-ip>:9000/` proxied to `127.0.0.1:8332` for Bitcoin Core RPC - `<wireguard-ip>:9000/debug-logs` serves `/data/debug-logs` (`CONSTANTS.DEBUG_LOGS_DIR`) for Bitcoin Core debug logs - `<wireguard-ip>:9000/peer-observer-websocket-tool/` proxies to the websocket tool ws on `127.0.0.1:8284` (PEER_OBSERVER_TOOL_WEBSOCKET_PORT) - `<wireguard-ip>:9000/peer-observer-metrics-tool/` proxies to the metrics tool metrics on `127.0.0.1:8282` (PEER_OBSERVER_TOOL_METRICS_PORT) - `<wireguard-ip>:9000/peer-observer-addressconnectivty-tool/` proxies to the address connectivity tool metrics on `127.0.0.1:8283` (PEER_OBSERVER_TOOL_ADDRCONNECTIVITY_PORT) - `<wireguard-ip>:9000/prometheus-exporter-node/` proxies to the node-exporter metrics on `127.0.0.1:9100` - `<wireguard-ip>:9000/prometheus-exporter-wireguard/` proxies to the wireguard-exporter metrics on `127.0.0.1:9586` - `<wireguard-ip>:9000/prometheus-exporter-process/` proxies to the process-exporter metrics on `127.0.0.1:9256`
This cleans up the tests a bit and improves readablility.
0xB10C
force-pushed
the
2026-02-proxy-node-ports-through-nginx
branch
from
February 9, 2026 14:00
e3c6cc9 to
b2afdab
Compare
deadmanoz
added a commit
to deadmanoz/infra-library
that referenced
this pull request
Feb 10, 2026
Fix two bugs introduced in peer-observer#85 (proxy node endpoints through nginx): 1. Wireguard Prometheus scrape job used NODE_TO_WEBSERVER_PATH_PROMETHEUS_EXPORTER_NODE instead of NODE_TO_WEBSERVER_PATH_PROMETHEUS_EXPORTER_WIREGUARD, causing it to scrape node-exporter metrics instead of wireguard-exporter metrics from remote nodes. 2. mkWebsocketLocation still used PEER_OBSERVER_TOOL_WEBSOCKET_PORT (8284) instead of NODE_TO_WEBSERVER_PORT (9000). Since the websocket tool now binds to localhost only and the firewall only exposes port 9000, the webserver cannot reach it on 8284.
deadmanoz
added a commit
to deadmanoz/infra-library
that referenced
this pull request
Feb 10, 2026
Query Prometheus /api/v1/targets on web1 to verify each remote-node scrape job uses the correct metrics_path and reports healthy targets. Catches wrong-path bugs like the wireguard metrics_path issue in PR peer-observer#85.
0xB10C
pushed a commit
that referenced
this pull request
Feb 10, 2026
Fix two bugs introduced in #85 (proxy node endpoints through nginx): 1. Wireguard Prometheus scrape job used NODE_TO_WEBSERVER_PATH_PROMETHEUS_EXPORTER_NODE instead of NODE_TO_WEBSERVER_PATH_PROMETHEUS_EXPORTER_WIREGUARD, causing it to scrape node-exporter metrics instead of wireguard-exporter metrics from remote nodes. 2. mkWebsocketLocation still used PEER_OBSERVER_TOOL_WEBSOCKET_PORT (8284) instead of NODE_TO_WEBSERVER_PORT (9000). Since the websocket tool now binds to localhost only and the firewall only exposes port 9000, the webserver cannot reach it on 8284.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We proxy all node endpoints that were previously exposed separately through one nginx proxied endpoint. This makes sure:
/debugendpoint on the node-exporter. This is not needed and not wanted.fixes #84