Talker.pl was created by Daniel J McDonald and Paul C. Williamson, so any suggestions should be directed to them and not me.
What you will need to get this to work;
As always, there are a few lines of code that need to be changed, these are;
Please note:MRTG library folder - Line 21
Change this to match the path of the MRTG2 lib directory
Change this line to match where your MRTG script is located
When you have completed the above changes point your web browser to http://YourWebServer/talker.pl to test your script.
If it doesn't work, double check what changes you have made.
Date format - Line 73
I changed this line to show the date format as d/m/yyyy
Just swap over $day and $month if you prefer it that way.
HTML Links within 'talker.pl' - Lines 261 & 265
You can either...
Don't change anything, just store the talker.pl script in the same folder as the 14all.cgi script.
or
If you want to send the link to another front end, or you store 14all.cgi in a different folder,
you can either add "Toptalker*url[]" to your script(s) and delete the blue section in the lines below
or change the blue section in the following lines.
my $urlin = a({-href=> $targets{'toptalker*url'}{$tin}.'
14all.cgi?log='.$tin,
my $urlout = a({-href=> $targets{'toptalker*url'}{$tout}.'14all.cgi?log='.$tout,
Number of talkers - Line 135
Changing these numbers will display different numbers in the dropdown box.
ie [1..10,15,20..30] - This will display the numbers 1 to 10, 15 and 20 to 30
Time Period (topparams) - Lines 103-109
'12 hrs' => [300, '-12h', 'now', 0],
So the above line would give you a time period from 12 hours ago up to NOW, with 300 second (5 minute)
samples
Please remember that the 'sort_order' value must be a unique value or it will mess up the list.
Other values that you can use here are;
s = seconds; h = hours; m = minutes or months; d = days.
These can also be used together, ie '-1d5h' would be 1 day and 5 hours ago.
If your wondering how it knows the difference between 'months' and 'minutes' then read this snippet from
the RRDTool's fetch manual...
Out of context (i.e. right after the + or - sign) the meaning of m is guessed from the number it directly follows. Currently, if the number absolute value is below 25 it is assumed that m means months, otherwise it is treated as minutes. (e.g., -25m = -25 minutes, while +24m = +24 months)
First let me explain how I organise my scripts.
Before talker.pl script was released I had three main scripts and a separate script for every device (that's just
over 200 scripts altogether).
Although this may not be the best way to organise your scripts, by me doing it this way I can
manage all my scripts without searching through long text files to change/add/remove any targets.
The main scripts are:
The main MRTG script The main RRDTool script A script that only contains 'Include' statements to the
targets mainscript.cfg rrdmain.cfg devices.cfg
What the script is for
The name of the script
What the script contains
WorkDir: c:\inetpub\wwwroot
IconDir: ./
XSize[_]: 600
Options[_]: unknaszero,bits,growright
WithPeak[_]: y
Unscaled[_]: dwmy
Include: c:\mrtg\bin\devices.cfg
WorkDir: c:\inetpub\wwwroot\rrd
IconDir: ./
XSize[_]: 600
Options[_]: unknaszero,bits,growright
WithPeak[_]: y
Unscaled[_]: dwmy
LogFormat: rrdtool
PathAdd: c:\mrtg\rrdtool\perl-shared\t
LibAdd: c:\mrtg\rrdtool\perl-shared
Include: c:\mrtg\bin\devices.cfg
Include: c:\mrtg\scripts\router1.cfg
Include: c:\mrtg\scripts\router2.cfg
Include: c:\mrtg\scripts\router3.cfg
Include: c:\mrtg\scripts\router4.cfg
Include: c:\mrtg\scripts\router5.cfg
Include: c:\mrtg\scripts\Server1.cfg
Include: c:\mrtg\scripts\Server2.cfg
Include: c:\mrtg\scripts\Server3.cfg
Include: c:\mrtg\scripts\Sw1-p1.cfg
Include: c:\mrtg\scripts\Sw1-p2.cfg
Include: c:\mrtg\scripts\Sw1-p3.cfg
Include: c:\mrtg\scripts\Sw1-p4.cfg
etc...
etc...
My fourth script is my newest, it contains all the extra parameters used with the new talker.pl script and
it is this that I point talker.pl to (see Step 1 for details),
currently it only contains the Toptalker*group parameter that is used in the 'group' dropdown box.
On my script, the dropdown box will contain 'Traffic', 'Server' & 'Switch'.
|
toptalkers.cfg |
|
WorkDir: c:\inetpub\wwwroot\rrd Toptalker*group[router1]: Traffic Toptalker*group[router2]: Traffic Toptalker*group[router3]: Traffic Toptalker*group[router4]: Traffic Toptalker*group[router5]: Traffic Toptalker*group[Server1]: Server Toptalker*group[Server2]: Server Toptalker*group[Server3]: Server Toptalker*group[Sw1-p1]: Switch Toptalker*group[Sw1-p2]: Switch Toptalker*group[Sw1-p3]: Switch Toptalker*group[Sw1-p4]: Switch etc... etc... #The last line in the script should be... Include: c:\mrtg\bin\devices.cfg |
Below is an example of what you should see once you have correctly configured talker.pl.
Below is an example of what I see after I select 'Switch' from the group box, then click on the "Get ranking" button.
If you have problems following these instruction please e-mail me and explain what part you don't understand and I will try to reword it.
Current requested updates are;
This page was created on, Thu Jul 06 16:39(BST) 2001
And updated on, Fri Jul 27 10:51(BST) 2001