lg.conf(5)
πΈ NAME πΈ
okay bestie, welcome to lg.conf(5) from the File Formats Manual β this is the looking glass configuration file, and it's literally the vibe-control center for your looking glass scripts β¨
π 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. No cap, it's just Perl config doing its main character thing π
π VARIABLES π
The following variables are used (alphabetically):
LG_AS_REGβ*** not implemented.πLG_BGP_RTβ Allowsshow ip bgp neighborcommands that can produce heavy output, such assh ip bgp neighbor <ip> advertised-routesfor a transit customer when the neighbor address is followed by'advertised-routes'for thesh ip bgp neighborquery.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 thecloginrc(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 toprint().
Example: $LG_IMAGE="<img src=/icons/rancid.gif hspace=0>\n <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 toprint().
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 thesyslog(3)facility to use for logging. For syslog, the argument is the lowercase name of a syslog facility (seesyslog.h) without the'LOG_'prefix.
Example: local0
Default: $LG_CACHE_DIR/lg.log
LG_ROUTERDBβ Sets the location for therouter.dbfile in rancid'srouter.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 therouter.dbfiles of all the groups present in rancid, that is, the list will be a concatenation of the availablerouter.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 astelnet(1), are located. Its value is set byconfigure. Should it be necessary to modifyPATH, note that it must include$BASEDIR/bin(see above).
The file also has this little line, literally:
Queries ...................................
π¦ ENVIRONMENT π¦
LG_CONFβ Location oflg.conffile. 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(7), 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.
Signed, sealed, and slaying from the File Formats Manual on 7 Jan 2004 β this was lg.conf(5), and yes, she ate π
β¨
π¦ where this page comes from
- alpine 3.24: rancid-doc 3.14-r0 Β· BSD-3-Clause-No-Nuclear-License-2014
- epel 9: rancid 3.13-7.el9 Β· BSD with advertising
- fedora 43: rancid 3.13-16.fc43 Β· BSD-3-Clause
- fedora 43: rancid 3.14-1.fc43 Β· BSD-3-Clause
- fedora 44: rancid 3.13-17.fc44 Β· BSD-3-Clause
- fedora 44: rancid 3.14-1.fc44 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms