Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

lg_intro(1) [debian man page]

lg_intro(1)						      General Commands Manual						       lg_intro(1)

NAME
lg_intro - introduction to the looking glass INTRODUCTION
The looking glass offers a web based interface to routers to users without their needing permission to login to the router. This may be a perfect interface for customer support or less savvy folks, and many ISPs have given public access to such an interface as a "route server." DESCRIPTION
The looking glass consists of two CGI perl(1) scripts, lg.cgi and lgform.cgi, and the lg.conf(5) configuration file. Both of these scripts begin with reading the configuration file. If there is an error in the file's syntax or if the file can not be found, error messages will be displayed on standard-error. The Apache http server redirects standard-error to its error log file by default. lgform.cgi displays a html form consisting of a list of possible router commands that can be run and a scrolling list of routers that these commands may be run on. When the form is submitted, lg.cgi is run. lg.cgi begins by performing some basic checks on the arguments passed to it. If these checks pass, lg.cgi either displays cached data from a previous invocation, if that data exists and is within the cache interval, or uses clogin(1) to login to the device and execute the command. The results of the command are cached if applicable and displayed for the user. GETTING STARTED
Besides lg.conf(5), additional instructions for setting up the looking glass can be found in the README file under /var/lib/rancid/README.lg. Note that the looking glass scripts require a few perl modules not included with rancid. Rancid's configure process does not check for these. See the README file. SEE ALSO
cloginrc(5), clogin(1), lg.conf(5) HISTORY
Rancid's looking glass is based on Ed Kern's (included by permission, thanks Ed!), which could once be found on http://nitrous.digex.net/ but has apparently been removed. Support for Juniper and Foundry devices, use of rancid's device login scripts, and additional commands and checks have been added to the original. 24 Jan 2001 lg_intro(1)

Check Out this Related Man Page

lg.conf(5)							File Formats Manual							lg.conf(5)

NAME
lg.conf - looking glass configuration file DESCRIPTION
lg.conf contains configuration for the looking glass scripts. The syntax is that of perl(1). It is used to set variables that affect run-time behavior and/or to locate resources. VARIABLES
The following variables are used (alphabetically): LG_AS_REG *** not implemented. LG_BGP_RT Allows show ip bgp neighbor commands that can produce heavy output, such as sh ip bgp neighbor <ip> advertised-routes for a transit customer when the neighbor address is followed by 'advertised-routes' for the sh ip bgp neighbor query. LG_CACHE_DIR Sets the location of the cache directory. The looking glass uses this to hold lock files, log files, and output from cached commands. Default: ./tmp Note that the default is relative to the directory where lg.cgi runs in the server's document root (e.g.: /usr/local/www/data/lg/tmp). LG_CACHE_TIME Sets the number of seconds that the looking glass should cache output from commands that tend to produce a lot of output, such as 'show ip bgp dampened-paths'. Default: 600 LG_CLOGINRC Defines the location of the cloginrc(5) that the looking glass should use. The path may be relative to the directory where the CGI scripts run in the server's document root. Default: $HOME/.cloginrc Note that the .cloginrc must be readable by the user or group that will be running the CGI and that clogin(1) will not allow a world readable .cloginrc. The user is normally that of the http server (httpd). LG_IMAGE Defines a html image tag (<img>) which, if defined, will be included at the top of the looking glass pages. It may contain any html as it is simply handed off to print(). Example: $LG_IMAGE="<img src=/icons/rancid.gif hspace=0> <font size=+2>FOO</font>"; LG_INFO Defines information in html format which, if defined, will be included at the bottom of the looking glass form page. It may contain any html as it is simply handed off to print(). Example: $LG_INFO="For Support contact <a href=mailto:webmaster@localhost>webmaster</a>"; LG_LOG Defines the fully qualified path name (i.e.: begins with '/') for the log file or the syslog(3) facility to use for logging. For syslog, the argument is the lowercase name of a syslog facility (see syslog.h) without the 'LOG_' prefix. Example: local0 Default: $LG_CACHE_DIR/lg.log LG_ROUTERDB Sets the location for the router.db file in rancid's router.db(5) format. It lists the devices that should be available to the looking glass users. Only those devices of supported types and with state 'up' are made available. If not defined and the default file does not exist, the looking glass will compile a list from the router.db files of all the groups present in rancid, that is, the list will be a concatenation of the available router.db(5) files. Note that if the concatenation method is used, it may be necessary to alter the mode of the router.db files in the rancid group directories, since rancid's default umask is 027 (see rancid.conf(5)). LG_STRIP Causes the LG to strip login information from the looking glass results. Since Expect often munges disabling echo when passwords are entered, this is a SECURITY CONCERN! However, this output can be very useful for debugging clogin problems. LG_STYLE Defines the URL of a style sheet to be used for HTML formatting. PATH Is a colon separated list of directory pathnames in the file system where rancid's login scripts, clogin(1) etc.) and programs needed within these, such as telnet(1), are located. Its value is set by configure. Should it be necessary to modify PATH, note that it must include $BASEDIR/bin (see above). Queries ................................... ENVIRONMENT
LG_CONF Location of lg.conf file. See the FILES section for more information. ERRORS
lg.conf is interpreted directly by perl(1), so its syntax follows that of perl. Syntax errors may produce quite unexpected results. FILES
/etc/rancid/lg.conf Configuration file described here. lg.conf is located by the value of the environment variable LG_CONF, in the CWD (current working directory), or the sysconfdir defined when rancid was installed, in that order. SEE ALSO
cloginrc(5), lg_intro(1), router.db(5) HISTORY
In RANCID releases prior to 2.3, lg.conf was located in the util/lg sub-directory of the install path. This was changed to be more consistent with common file location practices. 7 Jan 2004 lg.conf(5)
Man Page