Community discussions

MikroTik App
 
ekkas
Long time Member
Long time Member
Topic Author
Posts: 567
Joined: Mon Sep 26, 2005 1:01 pm
Location: South Africa

Reset counters

Mon May 05, 2008 4:13 pm

How do I reset all users counters and eg. end of month?
I can do 1 by 1 in terminal but that is just crazy.
Using web interface would be great so users(manager) can do it themselves.
Ekkas
 
User avatar
krigevr
Member Candidate
Member Candidate
Posts: 155
Joined: Mon Aug 20, 2007 7:02 pm
Location: South Africa

Re: Reset counters

Wed May 07, 2008 9:28 pm

You can write a script to execute the following command at Month's End:
/tool user-manager user
reset-counters
See my Automated Billing script's Month-End script, which may be of help:
http://wiki.mikrotik.com/wiki/AutomatedBilling

-Krige
 
ekkas
Long time Member
Long time Member
Topic Author
Posts: 567
Joined: Mon Sep 26, 2005 1:01 pm
Location: South Africa

Re: Reset counters

Wed May 07, 2008 11:26 pm

Thanks for that.
Is there a way to eg. email a list of current counters somewhere before you clear them? Just so you can keep history. I'm not big on scripting in MT, but can write a Win32 app to log in with API and get it if it must. I also do not want to implement your whole AutomatedBilling as it is nice, but to much for what we need.

Thanks
Ekkas
 
User avatar
krigevr
Member Candidate
Member Candidate
Posts: 155
Joined: Mon Aug 20, 2007 7:02 pm
Location: South Africa

Re: Reset counters

Thu May 08, 2008 10:01 pm

Well, see if you can decypher the Billing subscript of my Automated billing thingy - That one provides for the functionality of E-mailing the client, and yourself, some usage information before resetting the counters. You can chop and change as you like, of course.

But yes, it is definitely possible.
If you need advice or pointers on scripting for it, I'll be happy to help.

-Krige

Who is online

Users browsing this forum: No registered users and 6 guests