Help...Mikrotik as SLA Monitoring

Hi,

Anyone know how to make mikrotik as SLA Monitoring ?

Ex:
if 3 of 10 pings to Yahoo timeout, it will send email with subject “Yahoo loss 30%”.
if 5 of 10 pings to Yahoo timeout, it will send email with subject “Yahoo loss 50%”.
if 10 of 10 pings to Yahoo timeout, it will send email with subject “Yahoo Dead”.

if 10 of 10 pings to Yahoo no packet loss, it will send email with subject “Yahoo Live”.


Regards

please see wiki.mikrotik.com for script example that pings and reports results.

Yes, I already read wiki, but there are no script for counting how many percentage loss packets.

Since more than a year ago, here script I am using.

:if (([/ping x.x.x.x count=10 interval=1]<1) && ([/ping y.y.y.y count=10 interval=1]<1)) do={
{/tool e-mail send to="aaa@bbb.com" subject="LOSS Packet 100%"}
} else={
}

But I need better script like what I mentioned in my first post above.
Could you help me please ?

Regards