MRTG dynamic PPPoE or PPTP interface

Hello,
My Mikrotik is PPoE and PPtP concentrator. Is there any way to MRTG pppoe interface constantly.
The problem is, when some customer restart router (client side) PPPoE get different OID and MRTG stop working.

i have been also asking the same question
and seems mikrotik is not going to answer it

Helo, a solution is described in this post http://forum.mikrotik.com/t/graphing-snmp-queue-tree-traffic-in-routeros-2-8/56/1

We are some issue:

  • interface-number (or OID) change every user connection
  • using cfgmaker whit option
-ifref=nr -ifdescr=name

MRTG work fine and create graphs… but after user reconnection, MRTG loose history because MRTG use interface-name in .html e .log file… and don’t match…

  • using cfgmaker whit option
-ifref=name, -ifdescr=name

MRTG/SNMP seem not able to read data; I suppose the problem is name of PPPoE interfaces, like …


A solution can be modifiy cfgmaker (when using option -ifref=nr ifdescr=name) to use interface-name (like ) as namefile of .html and .log file where MRTG store data and interface-number for target (readed by SNMP). So after user disconnect/connect MRTG will store data always in a file named like .log

cfgmaker -ifref=nr -ifdescr=name

need to retur for target line a code like:

Target[router_<pppoe-user0002>]: 15744109:public@router:

instead of:

Target[router_15744109]: 15744109:public@router:

Someone can help me? :slight_smile:

Sorry for m poor english…

Anu succeess yet ?

I need it asap!!!

Should not be a problem with the proper MRTG configuration!
Is not a MikroTik issue, it is about knowing how to configure and use MRTG.
I have used MRTG with many different devices and this issue always occurs. You need to find and use the proper interface reference.

Have you done it ?
can you share some images ?
How will MRTG know you connected 3 new customers today and you want to see their graph as well ?

I have not done this for that particular application but I faced the same issue in other cases.
Of course you need to write a program/script that adds MRTG config for every new interface (customer in your case).
But that is quite easy as it is only the addition of a fixed section with simple parameter substitution (the name).

Your email address please.

I’m working on this today…

Target[username]: <pppoe-username@udomain.net>:community@router.domain.net

seems to work.

Are you sure?
Can you post a real example?

Logout and login again. And see.
I doubt.

And screenshots upload please.

Seems to work:

#Target[username]: <pppoe-username@udomain.net>:community@router.domain.net

Target[t000287]: \<pppoe-t000287\@xxxxxx.yy>:community@xxx.yyy.zzz.kkk::5::2:2

screenshots please.

Sorry, I just tried for test and deleted.

I m using other way to generate .cfg because customers can login into multiple PPPoE server,
so a script perform a query from RADIUS and generate .cfg file for “current connected” users for each NAS.

If you have only a NAS or customers are locked to a NAS, use this.
Try, its work.

In mrtg config, you can use interface names instead of interface numbers.
e.g. instead of something like

Target[host_2]: 2:public@192.168.1.1:

one could use the interface name prefixed by #:

Target[host_2]: #eth0:public@192.168.1.1:

can anyone post a sample mrtg config for the PPPoE or PPTP interface

Adapt fields to yout needs… Interface name (ppoe_interface in the example), IP’s(interface is assumed on 192.168.1.1), speeds.
localhost_11 is just a label and needs to be unique in the config.

Target[localhost_11]: #pppoe_interface:public@192.168.1.1:
SetEnv[localhost_11]: MRTG_INT_IP="192.168.1.1" MRTG_INT_DESCR="PPPoE"
MaxBytes[localhost_11]: 125000000
Title[localhost_11]: Traffic Analysis for PPPoE Interface
PageTop[localhost_11]: <h1>Traffic Analysis for PPPoE Interface</h1>
		<div id="sysdetails">
			<table>
				<tr>
					<td>System:</td>
					<td>Router</td>
				</tr>
				<tr>
					<td>Maintainer:</td>
					<td>Admin &lt;admin@localhost&gt;</td>
				</tr>
				<tr>
					<td>Description:</td>
					<td>PPPoE Interface </td>
				</tr>
				<tr>
					<td>ifType:</td>
					<td>pppoe</td>
				</tr>
				<tr>
					<td>ifName:</td>
					<td>pppoe_interface</td>
				</tr>
				<tr>
					<td>Max Speed:</td>
					<td>125.0 Mbytes/s</td>
				</tr>
				<tr>
					<td>Ip:</td>
					<td>192.168.1.1</td>
				</tr>
			</table>
		</div>

ok i was able to get the value
but is a non existent interface is there in config it takes a long time before exiting the check
any solution for that??

If you use the interface number, that’s faster. But then this number changes if the interface goes down and up again, depending on the system.
If it stays the same, you can use something like 3:public@192.168.1.1: (you need to find it via a snmp walk…)

What i want is to graph all available interface at once including dynamic one by name.
Some wildcard kind of thing like #ether-*:public@192.168.1.1: is it possible ??