| 1 |
From: CmdrData <[email protected]> |
| 2 |
Subject: mrtg for nt and cisco |
| 3 |
|
| 4 |
I have been using MRTG running on Windows NT now for a few months and find |
| 5 |
it to be pretty cool. Thanks so much for making a free tool. |
| 6 |
|
| 7 |
The first time I installed it was on a Proliant 2500 w/ dual 200 Mhz CPUs , |
| 8 |
and the setup was sloppy b/c I was learning how to run the program and make |
| 9 |
the config files, programatically. The setup I had was less than ideal. |
| 10 |
|
| 11 |
So I built a new Proliant 6500 w/ 4 x 200 Mhz CPUs and 3/4 GB RAM and |
| 12 |
hardware RAID5 using 6 drives a couple of months later. I also install |
| 13 |
Microsoft SQL server and IIS on the box. What I now have is an mrtg |
| 14 |
database in sql wh/ has 2 tables 1 for NT devices and 1 for Cisco Devices. |
| 15 |
The main web page I use has 2 combo boxes which load from these table |
| 16 |
devices descriptors which are names and not ips. |
| 17 |
|
| 18 |
The main reason I used sql was so the web page would get auto updated when a |
| 19 |
devices was added and also so I could automate the configuration file |
| 20 |
creation and the list of devices it choose to poll. I made a DTS package in |
| 21 |
sql which every 2 hours dumps parts of the two tables to text files (the sql |
| 22 |
7.0 DTS wizard for this makes it easy to dump parts of a table to a file). |
| 23 |
these 2 files are used to update all the configs every 12 hours. To |
| 24 |
accomplish this I had to write a bunch of batch files that would read text |
| 25 |
file input and do some very repeatable tasks. I also set a few environment |
| 26 |
variables to make the writing and reading easier. |
| 27 |
|
| 28 |
Since your site was very useful in getting me started I wanted to give a |
| 29 |
little back. I have attached a few nt batch files which would be useful for |
| 30 |
anyone trying to set it up on NT. I still have more automating to do like |
| 31 |
making the default.asp page without needing hand editing, and I haven't |
| 32 |
automated the ntconfig process. But right now to add cisco devices all I |
| 33 |
need to do is add a record to a database! I am using this setup to monitor |
| 34 |
about 2700 + ports on mainly catalyst 6500's right now and it finishes its |
| 35 |
polling cycle in about 4 minutes. The machine seems to be cpu and disk |
| 36 |
bound. Quad 450's would be better and a raid with more drive heads would |
| 37 |
also be better. I used the START command with the /BELOWNORMAL switch in a |
| 38 |
couple of places to allow the OS to jump in if it needs to b/c the CPU rides |
| 39 |
at about 99-100% for most of the 4 minutes. SQL is not needed to make use |
| 40 |
of the attached scripts. The files just contain 3 items, name (wh/equals |
| 41 |
part of the workdir path), comm str and IP [or netbiosname]. |
| 42 |
|
| 43 |
I also had to hunt around for the nt info and put it in to one file which |
| 44 |
you can do a find and replace on to customize what nt targets you poll. |
| 45 |
|
| 46 |
Feel free to post these files if you like. |
| 47 |
|
| 48 |
What I still have not figured out is how to get the detailed port |
| 49 |
description to be used instead of the ifIndexs. The post you have on this |
| 50 |
doesn't work with the port for NT and I don't know Perl. If you have any |
| 51 |
suggestions on this I would appreciate it. I tried to compare the mrtg file |
| 52 |
from the nt port and the hack and the files were too different for me to |
| 53 |
splice together without real knowlegde of perl, etc. |
| 54 |
|
| 55 |
Anyhow love the app. I work for a web hosting company. |
| 56 |
|
| 57 |
thanks, |
| 58 |
|
| 59 |
-Jon |