Cacti / spine

Spine C Based Poller for Cacti
GNU Lesser General Public License v2.1
80 stars 44 forks source link

Can't ping6 IPv6 hosts #343

Closed avibrazil closed 5 months ago

avibrazil commented 5 months ago

IPv6 hosts that are acessible to the Cacti host server appear as unavailable in the UI. Additionally, in the cacti_stderr.log I'm getting lots of messages like this:

sh: line 1: ping6: command not found

I guess this is related.

Problem happens with and without the cacti-spine package installed.

On the Cacti host I can successfuly ping6 the cacti-monitored hostname:

cactiserver$ ping6 ipv6-host.domain.com
PING ipv6-host.domain.com(2804:....::4 (2804:....::4)) 56 data bytes
64 bytes from 2804:....::4 (2804:....::4): icmp_seq=1 ttl=53 time=239 ms
64 bytes from 2804:....::4 (2804:....::4): icmp_seq=2 ttl=53 time=239 ms

About my environment:

# which ping6
/usr/sbin/ping6
# rpm -qf /usr/sbin/ping6
iputils-20221126-1.fc37.x86_64
# rpm -qa | grep cacti
cacti-1.2.25-1.fc37.noarch
cacti-spine-1.2.25-1.fc37.x86_64

I have Cacti 1.2.25 installed from official RPMs on a Fedora 37 host.

The expected behavior is to have Cacti successfuly ping6 addresses as its host does.

I've found other bug reports related to pinging IPv6. I also tryied to download patched files from Cacti's developer branches, such as scripts/ping.pl, but they are identical to my system's files. If this was already solved in other bug reports, please point me to the patched file on the repo so I can cirurgically substitute it in my system while waiting for new RPMs.

Thank you in advance.

TheWitness commented 5 months ago

If you edit /lib/ping.php, edit the references to "ping6" and replace with "/usr/sbin/ping6", let us know if the issue goes away.

TheWitness commented 5 months ago

Sorry, we do not support ping6 in Spine yet. Looking for a contributor still.

TheWitness commented 5 months ago

Duplicate of #127

TheWitness commented 5 months ago

This is fixed in cacti now.

avibrazil commented 5 months ago

Would please provide more details on where it was fixed, branch, commit etc?

I’d like to backport the patches to my 1.2.25 installation.

thank you in advance

TheWitness commented 4 months ago

Spine does not ping ICMP v6 hosts. So, though it's fixed in upstream Cacti, if you use the Availablilty/Reachability of Ping ICMP, it's not going to work. Suggesting that IPv6 devices use one of the SNMP Availability/Reachability methods.

TheWitness commented 4 months ago

Though, if you are using the ping Graph Template, you should update lib/ping.php from the 1.2.x branch, and you should be all set.