Tweaking the configuration

Analog has many many many configuration options for squeezing all kinds of bizarre statistics out of your log server files. But the clock is ticking, so we won't get into that now. Here is a simple sample file to get you started

The first two lines are to speed up host name lookup, and the HOSTNAME is part of the titles used to pretty up the report. HOSTEXCLUDE is used to ignore hosts we aren't interested in, and OUTFILE is where the report output goes. The report is generated in html format, so load it into your browser.

Help! The graphics look wrong

The images in the reports should look ok. The package installer will put them in the right places for analog to pick them up. However, if they don't appear, then look at the URLs. (In Debian Linux the images are held at /usr/doc/analog/images/, but the html says /doc/analog/images. This is because of Debian policy: the /usr/doc tree is supposed to be web accessible.) To get back to the point ..to fix this problem, look at your web server configuration files. These are in /etc/apache or /var/lib/httpd. Edit srm.conf and http.conf. One will have a section with Aliases; the exact file varies with the version of Apache. Add an alias like:

Alias /doc/analog/images/ /usr/doc/analog/images/

and restart the server with the command apachectl graceful

Then it should be fine. If it isn't then you are accessing the server report with a file:/ url, use http:// instead and all will be well.

Making the report run every day

Next you want the report to run every day; type in crontab -e at your shell prompt and then add this line to the file:

0 3 * * * /usr/bin/analog +g/home/james/analog.ini

This means run the command given at 3:00 a.m. daily.

See the tutorial "Time for Linux", that explains time-keeping and scheduling jobs on Linux, for more details.