-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 IP version selection #3885
base: master
Are you sure you want to change the base?
Add IP version selection #3885
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
As I described in the description, this PR supports ping, tcp, and dns. Which means it resolves the problem for these monitors. Notably, I can't fix http which requires a change to axios. Therefore while things are improved for these issues, they are not resolved if you are using an http monitor. |
This comment was marked as resolved.
This comment was marked as resolved.
Yes, I agree it Resolves #1025 Without digging into #3542 it's hard to know exactly what their issue is. This PR will add the option they're asking for to force IPv4. Do we consider that resolved? Even if their issue is something else. They have not given detail on their monitor, so it's unclear what is generating the error. |
Just have a quick look of code changes, haven't checkout yet.
|
Thanks for the comments. I'm happy to make adjustments. I have a few questions.
Furthermore, I have merged with master already, but happy to rebase. Do you want me to rebase to master, or is the merge OK?
I'll need to look into what this means.
I need to understand a bit more to resolve this. Would it be acceptable, to define a new variable in
This is mainly a UI comment. |
Maybe we should rename the variable to |
Happy to change the variable name. It stays as hostname to retain the existing behaviour if IPv4 or IPv6 is not selected. Would HostnameOrIp be more appropriate? |
Ah I see how it works now, I'm okay with this. I'm also slightly concerned that you're setting the value to null on error. Would continuing to execute the monitor with the null value give weird results? Should we revert to the original hostname, or throw an error to mark the heartbeat as DOWN? |
This is intended to generate an error in the monitor. We don't want to retain the original value, otherwise the monitor might succeed (e.g. it might be set to IPv6 and have no AAAA record, and then pass with IPv4 - this would have the IPv6 monitor showing up). It might be better to throw an error and mark the monitor down straight away. I'll look into that... |
@chakflying updated to throw instead of setting to null. This is definitely an improvement. Thanks. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Any more comments or are we good to merge? |
This comment was marked as spam.
This comment was marked as spam.
Can we get this PR merged? |
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma
Tick the checkbox if you understand [x]:
Description
This PR introduces the ability to force a monitor to use IPv4 or IPv6. The existing behavior is left as is if automatic is set (which is the default in the PR). I.e. end-users would need to specifically select IPv4 or IPv6.
This addresses (at least in part) the following issues:
Resolves #3542
Resolves #1242
Resolves #1025
The option is currently only available for the following monitors: ping, tcp, dns.
I looked into adding it for http monitors, but it is not possible without modifying axios, see:
Type of change
Please delete any options that are not relevant.
Checklist
(including JSDoc for methods)
Screenshots (if any)