summaryrefslogtreecommitdiffstats
path: root/util/lg/README
diff options
context:
space:
mode:
Diffstat (limited to 'util/lg/README')
-rw-r--r--util/lg/README64
1 files changed, 64 insertions, 0 deletions
diff --git a/util/lg/README b/util/lg/README
new file mode 100644
index 0000000..f574278
--- /dev/null
+++ b/util/lg/README
@@ -0,0 +1,64 @@
+This is a looking glass based on Ed Kern's which can be found on
+http://nitrous.digex.net/. This version supports cisco and
+juniper, uses rancid's [cj]login to login (so rcmd is not necessary,
+it can use telnet, ssh, or rsh), and has some additional commands
+implemented. There are a few cisco commands where either no juniper
+exists or we have not had time to implement yet.
+
+packing list:
+README This file.
+index.html often the default document the server will load, contains
+ an html redirect to load lgform.cgi
+lg.conf looking glass configuration file
+lg.cgi work horse of the looking glass
+lgform.cgi front-end form for the looking glass engine
+lgnotes.html manual for the looking glass
+
+the looking glass requires the CGI and LockFile-Simple perl modules.
+these can be retrieved from CPAN, http://www.cpan.org/. CGI's home is
+ftp://ftp-genome.wi.mit.edu/pub/software/WWW/. it also requires
+the POSIX module (for strftime) and Sys::Syslog, which i believe come
+with perl5.
+
+basic installation instructions:
+
+The configure and make install process will make variable substitutions
+and install bits in /usr/local/rancid/util/lg (or <prefix>/util/lg).
+
+1) make the scripts/html available to your server (httpd) by
+ creating a directory in your server's document root directory
+ (apache's httpd.conf "DocumentRoot" variable).
+ eg: assuming the default in freebsd's apache pkg
+ mkdir /usr/local/www/data/lg
+
+ then either:
+ - copy the files {lgnotes.html, lg.cgi, lgform.cgi} to
+ /usr/local/www/data/lg
+ OR
+ - create symlinks from /usr/local/www/data/lg to each of {lgnotes.html,
+ lg.cgi, lgform.cgi} in /usr/local/rancid/util/lg
+
+ note on links: if you use symlinks, you have to configure apache to
+ allow following symlinks. eg:
+ % cat /usr/local/www/data/lg/.htaccess
+ Options FollowSymLinks ExecCGI
+
+2) the LG needs to be able to find and read lg.conf. by default this
+ is installed as <PREFIX>/util/lg/lg.conf and the LG will look there.
+ however, LG_CONF environment variable can be used to move it elsewhere.
+
+ to get LG_CONF into the enviroment, you can SetEnvIf in apache's
+ httpd.conf like this for example:
+ SetEnvIf Request_URI "\/lg/.*.cgi" LG_CONF=/usr/local/util/lg/lg.conf
+
+3) edit <PREFIX>/util/lg/lg.conf.
+
+4) set-up cron jobs to rotate the log file and clean out old cache files.
+ see LG_CACHE_DIR & LG_LOG in lg.conf. something like (YMMV):
+
+ # rotate lookingglass log
+ #0 0 * * * cd /usr/local/www/data/lg/tmp; /usr/local/etc/savelog -m 666 -c14 lg.log
+ 0 0 * * * cd /usr/local/www/data/lg/tmp; /bin/mv lg.log lg.log.0
+ # clean out the lookingglass cache
+ 0 0 * * * cd /usr/local/www/data/lg/tmp; /usr/local/bin/find . -type f -maxdepth 1 \( \! -name lg.log\* \) -mtime +1 -exec rm -f {} \;
+