Linux – MRTG Configured; Need to monitor 1-2 Interfaces; Not All

bandwidth-measuringlinuxmrtgUbuntu

I have configured MRTG on Ubuntu machine & Its working great. I have have configured it for our MPLS router. In that there are many ports which being monitored. I don't want all to be monitored. I want only 1-2 interfaces to be monitored.

Can anyone please tell me how to configure that.

Best Answer

It should be as simple as taking the unwanted interfaces out of your mrtg.cfg file. Each interface should have its own set of lines with a unique identifier, so remove the lines you don't want.

If you're using some kind of script to generate the mrtg.cfg file, then you'll have to look to that. If you're using the stock cfgmaker script, you can apply an interface filter with the --if-filter= command; the filter is a perl-regex that defines the interfaces you want to include.