diff options
| author | beatrice <beatrice@dangofactory.net> | 2026-11-22 20:00:14 +0900 |
|---|---|---|
| committer | beatrice <beatrice@dangofactory.net> | 2026-11-22 20:00:14 +0900 |
| commit | 8f68d02045982da8f00a559835b500caf3a1967d (patch) | |
| tree | c8d0e92969b92e1b6559a0e032b6aa710a8ae2d9 /src/contrib/accesslistmon | |
| parent | bb5ff95073e5001be7dbf58ffce80d7926deff0b (diff) | |
| download | mrtg-master.tar.gz mrtg-master.zip | |
Diffstat (limited to 'src/contrib/accesslistmon')
| -rw-r--r-- | src/contrib/accesslistmon/INSTALL | 51 | ||||
| -rw-r--r-- | src/contrib/accesslistmon/README | 21 | ||||
| -rwxr-xr-x | src/contrib/accesslistmon/examplescript | 16 | ||||
| -rw-r--r-- | src/contrib/accesslistmon/mrtg.cfg | 21 |
4 files changed, 0 insertions, 109 deletions
diff --git a/src/contrib/accesslistmon/INSTALL b/src/contrib/accesslistmon/INSTALL deleted file mode 100644 index 1ba51c1..0000000 --- a/src/contrib/accesslistmon/INSTALL +++ /dev/null @@ -1,51 +0,0 @@ -INSTALL file for Access-list Monitoring via MRTG - - -First there are a few pre-requisites required in order to get the scripts going : - -A. MRTG :), which can be downloaded from :- -http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html - -B. A Cisco Router. - -C. Rsh enabled on the Cisco Router, this is done as follows : - -ip rcmd rsh-enable <--- Enabled the 'rsh' command/feature. -ip rcmd remote-host root x.x.x.x root enable <---- Allows the username of root from the -host x.x.x.x to execute commands via rsh. - -Once these commands have been enabled on the router you will be able to start executing -commands using 'rsh' from the shell of the machine you have allowed access from, I suggest as -an example try the following : - -rsh x.x.x.x sh ru - -If successful it should return a copy of you current 'running config' to the screen -If you get an error message like this 'Permission denied.' Please check the rsh enable feature -on the router to make sure you allow access for that host/username. - -Copy the scripts (which I have included in this package) into an appropriate directory to run -from, example I use the following : -/usr/local/mrtg/configs/accesslist -Its up to you what you use. - -Also make sure the scripts are executable 'chmod 755' should do the trick. - -I have also included a copy of the mrtg.cfg file required to run the scripts and feed them -onto the graph, this has the filename mrtg.cfg included in this package. - -There is one slight problem which I havent worked out as yet (if someone could help, hint, -hint) is that when MRTG doesnt receive an integer for 'out' in other words if the access-list -has returned 0 matches it will display an error message, the graph will still plot. This can -be very annoying if you are running it from cron, as you mailbox can get filled up with cron -error message, in my case I filter them to /dev/null using procmail. - -Thats it! - -I can be contacted by the following means : - -Email : roddy@satlink.com.au -ICQ : 1987890 - - -Enjoy! diff --git a/src/contrib/accesslistmon/README b/src/contrib/accesslistmon/README deleted file mode 100644 index d6701ff..0000000 --- a/src/contrib/accesslistmon/README +++ /dev/null @@ -1,21 +0,0 @@ -README file for Access-list Monitoring via MRTG - -MRTG can be found at : http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html - - -What this script does : - -Basically I wanted to monitor how many hits I had to a particular access-list for a Cisco -router. Rather than having to login and type the necessary commands, I thought it would be -easier to write a shell script to do it for me. -As MRTG is a graphing program, you can do almost anything with it, it then came into the -equation that it is possible to graph it by feeding it into MRTG. - - -Please see the INSTALL file for further instructions. - - - -N.B Please note I take no responsibility for any damage that is caused (not that it would I -dont think). -Feel free to modify the script any which way you wish. diff --git a/src/contrib/accesslistmon/examplescript b/src/contrib/accesslistmon/examplescript deleted file mode 100755 index 23a0a46..0000000 --- a/src/contrib/accesslistmon/examplescript +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -rsh x.x.x.x sh access-list 102 | grep icmp | grep matches | grep x.x.x.x | awk ' { print $8 }' | sed s/\(// -echo "0" - -#The first line will rsh into the router and display access-list number 102 (this will change -depending on your config), it will grep the access-list entry type in this case 'icmp', it -will also grep the ip of the machine in question, and output the relevant information. - -Eg: - -10 -0 - -10 = the number of times the ACL has matched. - -Remember you can change this to whatever you want. diff --git a/src/contrib/accesslistmon/mrtg.cfg b/src/contrib/accesslistmon/mrtg.cfg deleted file mode 100644 index 8558247..0000000 --- a/src/contrib/accesslistmon/mrtg.cfg +++ /dev/null @@ -1,21 +0,0 @@ -# Add a WorkDir: /some/path line to this file -Refresh: 300 -WriteExpires: Yes - -Target[examplescript]: `/usr/local/mrtg/configs/accesslist/examplescript` -Options[examplescript]: gauge -MaxBytes[examplescript]: 1000 -Title[examplescript]: Number of Ping attempts on machinename -YLegend[examplescript]: Ping Attempts -ShortLegend[examplescript]: Ping -LegendO[examplescript]: -PageTop[examplescript]: <H1>Number of Ping attempts on machinename - <BR></H1> - <TABLE> - <TR><TD>System:</TD><TD>machinename </TD></TR> - <TR><TD>Maintainer:</TD><TD>whoever</TD></TR> - <TR><TD>Interface:</TD><TD>Number of Ping attempts on machinename</TD></TR> - <TR><TD>IP:</TD><TD>x.x.x.x</TD><TR> - <TR><TD>Max Amount:</TD> - <TD>1000 </TD></TR> - </TABLE> |
