https://openwrt.org/docs/guide-quick-start/sshadministration
# Add to startup
sed -i -e "\$i (ping example.org &> /tmp/ping.log) &" /etc/rc.local
# Start
/etc/init.d/done boot
# Stop
killall -SIGINT ping
# Log
tail -f /tmp/ping.log
# Edit startup
vi /etc/rc.local
Log processing and rotation is on your own.
Although I'd better use MTR in a short term and Zabbix in a long term.