Community discussions

MikroTik App
 
marklodge
Member Candidate
Member Candidate
Topic Author
Posts: 250
Joined: Sun Jun 21, 2009 6:15 pm

Get traffic usage via PEAR2 API

Fri Aug 17, 2018 3:34 pm

I wish to see how much bandwidth was used per PPP connection, how would I do this via API, I understand that the options are probably Graphing, SNMP or Netflow.
I just need the simplest way for now. I need to get the usage and create monthly, weekly graphs.
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Get traffic usage via PEAR2 API

Sun Aug 26, 2018 12:40 pm

Using a specialized tool that analyzes SNMP and/or Netflow to generate a graph would be most efficient for the router indeed.

If you're OK with sacrificing some of that efficiency for the purposes of customizable implementation, the other way would be to detect a new PPPoE interface appearing (see your other topic), and when a new one appears, issue an "/interface monitor-traffic" command, and collect the results into your DB, from where you can later draw graphs.
 
marklodge
Member Candidate
Member Candidate
Topic Author
Posts: 250
Joined: Sun Jun 21, 2009 6:15 pm

Re: Get traffic usage via PEAR2 API

Wed Aug 29, 2018 12:06 am

Using a specialized tool that analyzes SNMP and/or Netflow to generate a graph would be most efficient for the router indeed.

If you're OK with sacrificing some of that efficiency for the purposes of customizable implementation, the other way would be to detect a new PPPoE interface appearing (see your other topic), and when a new one appears, issue an "/interface monitor-traffic" command, and collect the results into your DB, from where you can later draw graphs.

Could you recommend a simple tool please for SNMP or/and for Netflow?
My impression is that I need to setup a Netflow collector server or SNMP collector then pull the data from there to my php script. Am I correct?

Who is online

Users browsing this forum: JDF, Majestic-12 [Bot] and 32 guests