-
Change Request
-
Resolution: Unresolved
-
Minor
-
None
-
3.0.28, 4.0.9, 4.2.3, 4.4.0alpha1
-
None
-
None
-
CentOS 7
Steps to reproduce:
- From the problems list or latest data or similar, choose a host on IPv6
- Click the host and choose ping
Result:
Ping fails, script error
Expected:
Ping should work on both protocols.
Proposed fix:
Replace the ping script with something checking for protocol on machines with older iputils. I resorted to using an external script, since writing the script in the script editor in zabbix didn't allow for expanding variables. This is perhaps another bug I should report. The script I wrote, was simply this:
#!/bin/bash
if $( echo $1 | grep -q ':' )
then
OPTS=-6
fi
- echo $1 | grep -q ':' && OPTS='-6'
ping $OPTS -c 3 $1
case $? in
[01])
true
;;
*)
false
;;
esac