|
Packit |
667938 |
README - cisco_ip_acc_collect.pl
|
|
Packit |
667938 |
|
|
Packit |
667938 |
This is cisco_ip_acc_collect.pl V0.9
|
|
Packit |
667938 |
|
|
Packit |
667938 |
This Script gets IP-accounting data from a Cisco Router and generates output
|
|
Packit |
667938 |
that can be fed into MRTG.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Configzration:
|
|
Packit |
667938 |
--------------
|
|
Packit |
667938 |
|
|
Packit |
667938 |
First of all, I sugest you make a backup of your router config, before
|
|
Packit |
667938 |
you configure IP accounting and run this script... If something happens,
|
|
Packit |
667938 |
I've told you ...
|
|
Packit |
667938 |
|
|
Packit |
667938 |
In the networks you can enter the networks you like to analyse in the
|
|
Packit |
667938 |
following form:
|
|
Packit |
667938 |
|
|
Packit |
667938 |
xxx.xxx.xxx.xxx/CDIR Name
|
|
Packit |
667938 |
|
|
Packit |
667938 |
xxx.xxx.xxx.xxx is the IP Adress of the Network
|
|
Packit |
667938 |
|
|
Packit |
667938 |
CDIR is the CDIR Bitmask
|
|
Packit |
667938 |
/32 = 255.255.255.255
|
|
Packit |
667938 |
/24 = 255.255.255.0
|
|
Packit |
667938 |
/16 = 255.255.0.0 etc.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Name Is the name of the network.
|
|
Packit |
667938 |
This name can apear more than once.
|
|
Packit |
667938 |
The traffic of all networks that have same
|
|
Packit |
667938 |
name will be added into one output.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
In the .pl file you have to change some variables. See the .pl file for more
|
|
Packit |
667938 |
informations.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
In the mrtg config file you can enter something like this:
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Target[tagretname]: `cat /usr/local/mrtg/cisco_ipaccounting/log_test`
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Running this script:
|
|
Packit |
667938 |
--------------------
|
|
Packit |
667938 |
|
|
Packit |
667938 |
I start this script with cron, yost before mrtg like this:
|
|
Packit |
667938 |
|
|
Packit |
667938 |
*/5 * * * * cramer /usr/local/mrtg/cisco_ipaccounting/collect.pl ; /usr/local/mrtg/mrtg /usr/local/mrtg/accounting.conf
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Where to get updates:
|
|
Packit |
667938 |
---------------------
|
|
Packit |
667938 |
|
|
Packit |
667938 |
You can download new versions from ftp://ftp.dolphins.ch/pub/Dolphins/mrtg
|
|
Packit |
667938 |
|
|
Packit |
667938 |
|
|
Packit |
667938 |
Copyrigth & Warranty:
|
|
Packit |
667938 |
---------------------
|
|
Packit |
667938 |
|
|
Packit |
667938 |
This script is
|
|
Packit |
667938 |
(c) 1999 by Dolphins Network Systems, Matthias Cramer
|
|
Packit |
667938 |
|
|
Packit |
667938 |
This program is free software; you can redistribute it and/or modify it
|
|
Packit |
667938 |
under the terms of the GNU General Public License as published by the Free
|
|
Packit |
667938 |
Software Foundation; either version 2 of the License, or (at your option)
|
|
Packit |
667938 |
any later version.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
Packit |
667938 |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
Packit |
667938 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
Packit |
667938 |
more details.
|
|
Packit |
667938 |
|
|
Packit |
667938 |
You should have received a copy of the GNU General Public License along
|
|
Packit |
667938 |
with this program; if not, write to the Free Software Foundation, Inc., 675
|
|
Packit |
667938 |
Mass Ave, Cambridge, MA 02139, USA.
|