I need to monitor some ip adress by ping on every 10s and if fails 3 pings in 30s then send sms by usb gsm modem on some phone,
and when ping is up again 3 times in 30s then send sms again with second sms to notify me that link is up ![]()
how to do that?
thanks…
hi,
i use the netwatch funtion
/tools/netwatch
create a new netwatch → insert ip, select time on ping time
in up:
paste this
/tool sms send “INTERFACE FOR SMS MODULE” “PHONE NUMER” message=“THE MESSEAGE U WANT IN YOUR SMS”
in down:
paste this
/tool sms send “INTERFACE FOR SMS MODULE” “PHONE NUMER” message=“THE MESSEAGE U WANT IN YOUR SMS”
in my case sms module is on usb2
But netwatch send sms after one ping fail, I need to send SMS only if 3 pings fails in line
am I clear now? ![]()
Anyone some suggestion??
Create a schedule in System > Scheduler to run every 30s with the following script.
:local result [/ping 192.168.88.1 count=3]
:global status
:if ($result = 3 && $status != true) do={
/tool sms send message="link up" phone-number=12345
:set status true
} else={
:if ($result = 0 && $status != false) do={
/tool sms send message="link down" phone-number=12345
:set status false
}
}
Thanks, work great
![]()
Hello,
and do I need to run a PPP interface 3g modem? to be able to work this script to check the ping and sending SMS?
sir what if ISP is high ping only and has slow internet connection? ISP is not totally down, how to send also notification sir via sms? thanks