Community discussions

MikroTik App
 
dainen
newbie
Topic Author
Posts: 38
Joined: Tue Jul 05, 2005 12:33 pm
Location: Byron Bay, Australia
Contact:

PPP COUNT to EMAIL

Wed Feb 20, 2008 9:53 am

Hi we have an interesting scenario, we would like to monitor the amount of active ppp sessions and alert us if the count is less than a pre-defined threshold.
This would help with monitoring, as we can see if there is network issues without needing to monitor all our access points and individually.

Very poor example: /ppp active print count-only (if count < X, then EMAIL=Support@isp.com)

Thanks

Dainen - wwwires.com
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7187
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: PPP COUNT to EMAIL

Wed Feb 20, 2008 11:15 am

So what exactly do you need?
 
dainen
newbie
Topic Author
Posts: 38
Joined: Tue Jul 05, 2005 12:33 pm
Location: Byron Bay, Australia
Contact:

Re: PPP COUNT to EMAIL

Wed Feb 20, 2008 11:38 am

To query the amount of active ppp sessions on our boarder router, at a 5 min interval,

/ppp active print count-only

Then email us if it the count of those active sessions is below 175.

I do it manually now to check if the network is running and customers online.

Thanks for the help.

Dainen
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7187
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: PPP COUNT to EMAIL

Wed Feb 20, 2008 11:53 am

{
    :local pppCount [/ppp active print count-only];
    :if ($pppCount < 175) do={
        /tool e-mail send from="me@test.com" to="admin@test.com" server=<mail_server_ip> subject="ppp count" body="Only $pppCount active connections";
    }
}
Add this code to system scheduler with interval 5minutes.
 
dainen
newbie
Topic Author
Posts: 38
Joined: Tue Jul 05, 2005 12:33 pm
Location: Byron Bay, Australia
Contact:

Re: PPP COUNT to EMAIL

Wed Feb 20, 2008 12:15 pm

Cannot thank you enough !!!

Regards,

Dainen
 
dainen
newbie
Topic Author
Posts: 38
Joined: Tue Jul 05, 2005 12:33 pm
Location: Byron Bay, Australia
Contact:

Re: PPP COUNT to EMAIL

Wed Feb 20, 2008 12:56 pm

Hi again, would there be any chance that you could help re-write it for 2.9.48 Router OS.

It is our main boarder router and i don't want to upgrade it for a little while yet.

I tested it on our v3 router and it works brilliantly.


Thanks,

Dainen

Who is online

Users browsing this forum: No registered users and 7 guests