Community discussions

MikroTik App
 
wjw
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 91
Joined: Thu Jun 10, 2004 12:59 am
Location: New Zealand
Contact:

Traffic Monitoring

Thu Jun 10, 2004 1:11 am

Hi all,

I've got a nice little Mikrotik box sat between my customers and my main internet circuit and I'd like to keep a web based log of the amount of data they are transferring per month.

I have got Traffic Accounting working and the log downloads onto my server no problem, but ideally I'd like the router to send this data to a database that I can query from either PHP/ASP. I know I can parse the text file, but as that builds it will take too long.

I thought about building a little script that looks at http://10.10.10.200/accounting/ip.cgi every 30 seconds and writes the info to the database, but I don't know if that will capture all traffic stats. I really need more info on exactly how the web report is generated to do it that way.

Also I can't seem to find any info on the log file format, any know what it is?

Thanks,

Bill
 
csickles
Forum Guru
Forum Guru
Posts: 1255
Joined: Fri May 28, 2004 8:46 pm
Location: Phoenix, AZ
Contact:

Thu Jun 10, 2004 11:05 pm

I have been working on a pice of VB Code that does this..
It gets a primary bit count from the MIB and then requeries the router at 1sec. intervals. it then can calculate the bits/sec and total bits accross the interface. the code then writes the data to a SQL database.

The code is working but relies on a com object that I must lic. to redistribute.

Let me know if there is enough interest, I will look into paying for the code.

Craig
 
User avatar
maximan
Trainer
Trainer
Posts: 543
Joined: Sat May 29, 2004 12:10 am
Location: Rio Cuarto, Argentina
Contact:

Demo

Sat Jun 12, 2004 5:48 pm

Can we access to demo. I don't know if this tool work for me.
M.
 
wjw
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 91
Joined: Thu Jun 10, 2004 12:59 am
Location: New Zealand
Contact:

Tue Jun 15, 2004 9:11 am

I've built a messy solution for it and it works like so:

1. Log Downloaded, downloads the traffic logs every 10 minutes
2. VB script imports the text file into an access DB, then deletes the file
3. ASP Page can then query the data....

Problem is that the processing time for the VB script is getting too high, so may have to think of another way :(

Any chance on me buying a licence for the component?
 
wjw
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 91
Joined: Thu Jun 10, 2004 12:59 am
Location: New Zealand
Contact:

Tue Jun 15, 2004 9:12 am

Wont let me edit posts :( Just thought, I have an SNMP Component (Free) that I use here, perhaps that would be an option with your code?
 
changeip
Forum Guru
Forum Guru
Posts: 3833
Joined: Fri May 28, 2004 5:22 pm

Tue Jun 15, 2004 8:09 pm

The code is working but relies on a com object that I must lic. to redistribute.
We own the Dart components, I could possibly get you something compiled using their royalty free runtime licenses... What component are you using now ?

Sam