Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(telemetry): enable proxying of certain replica metrics from Gues…
…tOS to HostOS.
- Loading branch information
1 parent
e379220
commit 5413ab1
Showing
8 changed files
with
80 additions
and
4 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
proxies: | ||
# Allow proxying of certain metrics emitted by orchestrator. | ||
- listen_on: | ||
url: https://[::]:42372/metrics/guestos_replica | ||
# We reuse the SSL cert of node exporter. | ||
certificate_file: /etc/node_exporter/node_exporter.crt | ||
key_file: /etc/node_exporter/node_exporter.key | ||
connect_to: | ||
# Replica listens HTTP on this port. | ||
url: http://[::1]:9090/metrics | ||
# In case of conflict, the last matching rule | ||
# overrides any previous rules. | ||
# Full documentation at: | ||
# https://github.com/dfinity/metrics-proxy | ||
label_filters: | ||
- regex: .* | ||
actions: | ||
- drop | ||
# Consensus metrics. | ||
- regex: artifact_pool_consensus_height_stat | ||
actions: | ||
- keep | ||
metrics: | ||
# Telemetry of metrics-proxy itself (port open for GuestOS in ic.json5.template, see nftables.conf in HostOS for context). | ||
url: https://[::]:19100/metrics | ||
# We reuse the SSL cert of node exporter. | ||
certificate_file: /etc/node_exporter/node_exporter.crt | ||
key_file: /etc/node_exporter/node_exporter.key |
16 changes: 16 additions & 0 deletions
16
ic-os/guestos/rootfs/etc/systemd/system/metrics-proxy.service
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[Unit] | ||
Description=Prometheus metrics proxy | ||
After=node_exporter.service | ||
|
||
[Service] | ||
User=metrics-proxy | ||
ExecStart=/opt/ic/bin/metrics-proxy /etc/metrics-proxy.yaml | ||
Restart=on-failure | ||
RestartSec=10 | ||
KillSignal=SIGINT | ||
StartLimitBurst=5 | ||
StartLimitInterval=60 | ||
LimitNOFILE=65536 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains 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
This file contains 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
This file contains 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