If all you are interested in is having a summary graph of the Incoming traffic,
and another summary graph of the Outgoing traffic, then Routers2 does this
automatically. You can put 'showtotal=yes' in your routers2.conf and the
Incoming and Outgoing graphs will be generated with additional Total traffic
lines.
However if you want to do this by a subset of ports, or on a single graph, then
you'll need to do more work.
What you will need to do is to define a UserDefined summary graph over the
ports that you are interested in. This summary graph can optionally include
the separate lines for the ports, optionally stacked, with a Total line. I
would suggest you suppress display of the numerical per-port data and per-port
lines, and only include the total numbers and total lines, else it would be
confusing - though you could use stack-mirror mode and include the per-port
data.
To generate this automatically from cfgmaker, you'll need to use interface
templates and host templates. The Host template should define the display
parameters for the summary graph; the interface tmeplate should add the
interface to the summary graph (if it meets the criteria you specify). This
will require a bit of Perl coding knowledge.
Here is an EXAMPLE that needs a bit of work to complete.
Host template:
$target_lines .= <<ECHO;
routers.cgi*ShortDesc[mygraph]:Total
routers.cgi*Title[mygraph]:Total traffic
routers.cgi*Options[mygraph]:total nolines nodetails
#routers.cgi*GraphStyle[mygraph]:stackmirror
#routers.cgi*Options[mygraph]:total active
ECHO
And an interface template:
$target_lines = $default_target_lines;
if( insert your condition here ) {
$target_lines .= "routers.cgi*Graph[$target_name]: mygraph total nolines
nodetails\n";
}
With a little work, this should achieve what you want automatically.
Alternatively, you can manually set up a set.
Other useful options for the routers.cgi*Graph definition are 'active' (which
will suppress components which are not active - remove the nolines and/or
nodetails options if you use this), and if you remove either nolines or
nodetails, you may want to use routers.cgi*GrpahStyle[mygraph]:stackmirror in
the host template to get a stacked/mirror graph.
There's a lot more information on this in the documentation, in the book
http://steveshipway.org/book/ or in the forum http://www.steveshipway.org/forum
and there are some demo configurations showing stacked userdefined graphs in
the demo site http://www.steveshipway.org/cgi-bin/routers2.pl
Steve
________________________________
Steve Shipway
ITS Unix Services Design Lead
University of Auckland
Floor 2, 58 Symonds Street
09 3737599 ext 86487
P Please consider the environment before printing this e-mail
From: Nick Wambugu [via MRTG Mailinglists]
[mailto:[email protected]]
Sent: Tuesday, 7 September 2010 1:13 a.m.
To: Steve Shipway
Subject: Aggregate switch mrtg
I have installed and run mrtg on a 52 port switch which is running. Now i want
to generate the aggregate for ports in use. How do I get the file to run to
generate this.
Thsnks
--
"STRENGTH DON COME FROM PHYSICAL CAPACITY. COMES FROM AN INDOMITABLE WILL"
_______________________________________________
mrtg-developers mailing list
[hidden email]</user/SendEmail.jtp?type=node&node=5503082&i=0>
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg-developers
________________________________
View message @
http://mrtg-mailinglists.795376.n2.nabble.com/Aggregate-switch-mrtg-tp5503082p5503082.html
To start a new topic under MRTG Developers Mailinglist, email
[email protected]
To unsubscribe from MRTG Developers Mailinglist, click
here<http://mrtg-mailinglists.795376.n2.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=795384&code=cy5zaGlwd2F5QGF1Y2tsYW5kLmFjLm56fDc5NTM4NHwxMDA4NTg3NjE5>.
--
View this message in context:
http://mrtg-mailinglists.795376.n2.nabble.com/Aggregate-switch-mrtg-tp5503082p5504630.html
Sent from the MRTG Developers Mailinglist mailing list archive at Nabble.com.
_______________________________________________
mrtg-developers mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg-developers