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

Allow pinging to IPv6-only hosts #49

Closed
wants to merge 1 commit into from
Closed

Conversation

T-X
Copy link

@T-X T-X commented Apr 19, 2016

This is a "quick and dirty" patch to allow measuring the latency
to hosts which do not have an IPv4 address, but an IPv6 one only.

If an IPv4 ping fails with an "unknown host" then, with this patch,
cacti will simply retry with the ping6 command.

Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue

This is a "quick and dirty" patch to allow measuring the latency
to hosts which do not have an IPv4 address, but an IPv6 one only.

If an IPv4 ping fails with an "unknown host" then, with this patch,
cacti will simply retry with the ping6 command.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
@cigamit
Copy link
Member

cigamit commented Apr 19, 2016

in lib/ping.php, I'd prefer to use a function call to determine if the ip address is v6 or not and use the correct shell exec right from the start. I think you will find a check for ipv6 ip's in the code. We also have to accommodate people who want to append port numbers to the ip's when SNMP is not running on a known port, for example 192.168.1.100:165. Make sense. The same should apply to the perl script too don't you think?

@cigamit
Copy link
Member

cigamit commented Aug 18, 2016

i am going to close this due to some merge conflicts. however, please review what was committed. it should suffice, and is quite close to what you had.

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

Successfully merging this pull request may close these issues.

2 participants