[mrtg] Possible bug / documentation error in Multi Target Syntax?
terry-mrtg at glaver.org
Thu May 11 01:21:35 CEST 2017
http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html says (under
Multi Target Syntax) that " Any syntactically correct expression that
the Perl interpreter can evaluate to will work" and gives an example
of adding two targets together (which does work). However, I have
been unable to get the reverse (subtraction) to work. Am I doing some-
thing wrong, or is this a documentation error or a programming over-
To complicate matters a bit, I also need to swap the In/Out values
on the interface being subtracted (as in the "Reversing" section of
the manual). I have not attempted this yet, but am wondering if MRTG
is mis-interpreting the minus sign when working with Multi Target Syn-
tax. And I'm perplexed by how I would actually put this into the MRTG
configuration file - I'm coming up with something like:
1:public at switchA:::::2 - -2:public at switchA:::::2
which is pretty arcane.
In case you're wondering "why would anybody want to do that", here
is the usage case: I have a customer with a link to us which carries
both traffic he pays me for, as well as traffic we send to another
interface (to a different upstream) for a fixed fee. The goal is to
graph "customer input minus upstream output" and "customer output
minus upstream input", to give a graph that represents only traffic
he is paying us for.
Right now I have a pretty horrible external script to accomplish
this (available on request), but from reading the documentation, all
of the pieces to do it inside MRTG should already exist, if I can
figure out how to combine them.
Terry Kennedy http://www.glaver.org New York, NY USA
More information about the mrtg