Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IPv6 support #18

Merged
merged 1 commit into from
Oct 21, 2024
Merged

Add IPv6 support #18

merged 1 commit into from
Oct 21, 2024

Conversation

serveric
Copy link
Contributor

Close #17

Allow binding the exporter to IPv6 addresses, too.

Use generic network to allow both IPv4 and IPv6:
https://pkg.go.dev/net#Listen
@serveric
Copy link
Contributor Author

Tested this by gathering metrics via both IPv4 and IPv6:

% sudo netstat -tulpen | grep 9650
[sudo] Passwort für tf: 
tcp6       0      0 :::9650                 :::*                    LISTEN      65534      385423     79454/keepalived_ex
 % curl "[::1]:9650/metrics"
# HELP keepalived_up Status
# TYPE keepalived_up gauge
keepalived_up 0

 % curl "127.0.0.1:9650/metrics"
# HELP keepalived_up Status
# TYPE keepalived_up gauge
keepalived_up 0

@gen2brain gen2brain merged commit 377e2e7 into gen2brain:master Oct 21, 2024
1 check passed
@gen2brain
Copy link
Owner

Merged, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add IPv6 support
2 participants