Merged
Conversation
added 2 commits
April 10, 2024 02:46
added 2 commits
April 11, 2024 02:00
|
Looks good! for I assume you meant |
Author
|
Oops you're right |
This pull request was closed.
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.
Close #96
ping @erikschul @fmierlo
This adds an argument
--info/-iwhich specifies an address and port (e.g.localhost:9080), which exposes a HTTP server that provides health status metric of the server.Currently two endpoints are implemented:
/metrics: Exposes information of the wireguard daemon, this provides the same information you would get withwg show. This shows an example of what the response would look like./readyz: This responds with a json which shows the last time a pong is received from an IP specified withCheckAlive. WhenCheckAliveis set, a ping is sent out to addresses inCheckAliveperCheckAliveIntervalseconds (defaults to 5) via wireguard. If a pong has not been received from one of the addresses within the lastCheckAliveIntervalseconds (+2 seconds for some leeway to account for latency), then it would respond with a 503, otherwise a 200.For example:
/readyzwould respond withAnd for:
/readyzwould respond withIf nothing is set for
CheckAlive, an empty JSON object with 200 will be the response.The peer which the ICMP ping packet is routed to depends on the
AllowedIPsset for each peers.