[mrtg] MRTG/RRDTool/14all.cgi

Garth K. Williams gwilliams at quack.com
Tue Dec 12 21:46:15 MET 2000


OK, I'll try again...

Here is a document I am working on to help people with
RRDTool/MRTG/14all.cgi integration.  I have seen several posts lately about
14all.cgi, and figured that I would release it now in the hope that it helps
others.  It will soon be on my web (www.wtcs.org/snmp4tpc)

If you have comments/suggestions/corrections, please email me at
garth.williams at wtcs.org.  Thank you!


MRTG/RRDTool Migration/14all.cgi implementation (Windows specific) Version
1.0

----------------------------------------------
MAKE SURE YOU HAVE A WORKING MRTG CONFIG
----------------------------------------------


---------------
First, RRDTool
---------------
1) MAKE SURE YOU ARE USING PERL 5.6 (www.activestate.com)

2) Download and install RRDTool

3) From the rrdtool/perl-shared directory, run "ppm install rrds.pm" (omit
the " ")

4) Make sure your MRTG config files have these lines in it (substitute path
where appropriate)

# START RDTOOL Add-ons -------------------------------------
# Modify Logfiles (*.log) to RRD format (*.rrd)
LogFormat: rrdtool
# RRD Executable (rrdtool.exe) location
PathAdd: d:/rrdtool/perl-shared/t
# RRD Perl module (RRDs.pm) location
LibAdd: d:/rrdtool/perl-shared
# STOP RDTOOL Add-ons -------------------------------------


-------------------
Next IIS/PWS Setup
-------------------
1) In IIS/PWS set up application mappings
- Stop the Web Service (Web Site (right-click)/Stop)
- Web Site (right-click)/Properties/Home Directory (tab)/Application
Settings/Configuration (button) you must make changes to the application
mappings like so..
 - assign drive:/path/perl.exe %s %s to .pl
 - assign drive:/path/perl.exe %s %s to .cgi
 - assign drive:/path/perl.exe %s %s to .rrdcgi
- Start the Web Service (Web Site (right-click)/Start)
This sets PERL to execute locally whenever an app with those extensions is
selected by a (web client)

2) Then, in IIS/PWS, modify your web server so that the CGI-BIN directory
(or wherever you put 14all.cgi) has EXECUTE permissions
-Select your CGI-BIN directory, then right click properties, and make sure
Execute (including script) is selected.  Also, make sure your Anonymous Web
User account has the appropriate permissions in the CGI-BIN directory to
execute (Check user permissions in NT)


---------------------
Now for 14all.cgi...
---------------------
Here's where you have several options.  I will outline what I have done.
I have a MRTG config (PC616083_SERVER.CFG) file for a device with several
OIDs inside it.  So, I rename 14all.cgi to match the name of my mrtg config
file (PC616083_SERVER.CGI).

1) Edit 14all.cgi (or whatever your file name) and change the lines like so
...
- On line 13, make it say...
  use lib qw(d:/mrtg/lib/mrtg2); (set paths appropriately)
- One lines 44-54, change them like so ... (again, change the paths to your
config)
### where the mrtg.cfg file is
# anywhere in the filespace
$cfgfile = 'd:/systap/cfg/servers/pc616083/pc616083_server.cfg';
# relative to the script
# $cfgfile = 'mrtg.cfg';
# use this so 14all.cgi gets the cfgfile name from the script name
# (14all.cgi -> 14all.cfg)
# $cfgfile = '';

# if you want to store your config files in a different place than your
cgis:
# $cfgfiledir = 'd:/systap/cfg';

2) Save the file.  If you want to test it, then open a CMD prompt in the
CGI-BIN directory, and run "perl 14all.cgi" (our whatever you called it,
omitting the " ")  you should see a screen full of html text.  That
indicates that 14all.cgi is reading the Config file, finding the
filename.rrd and generating HTML.

3)  Check out your CGI with a browser (http://ipaddress/[dir]/filename.cgi)

Well, thats about it!  Works for me!  Questions, mail me at
garth.williams at wtcs.org

Garth K. Williams
---
Outgoing mail is VIRUS FREE!
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.215 / Virus Database: 101 - Release Date: 11/16/00


--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list