Skip to content

Recipes

Outcome: four working habits assembled from the chapters — a daily report, a missing-pages audit, a bot census, and a before/after comparison — each with its own check.

Every command below was run in the lab in its component form (the transcripts named per recipe); the recipes assemble verified parts, on the lab's log, so you can reproduce each result exactly.

1. The daily report

Shape: one command, three artefacts, every morning.

goaccess access.log --log-format=COMBINED -o report.html
goaccess access.log --log-format=COMBINED -o report.json

Archive the pair by date. The HTML is for reading over coffee; the JSON is the one your future scripts will thank you for. Check: the two totals agree, and yesterday's JSON sits beside them in the archive. Add --persist and --restore (chapter 9) when rotation starts eating your history, not before — machinery earns its place when the problem arrives. (Transcripts t04, t05.)

2. The missing-pages audit

Shape: the not-found panel, taken seriously.

Run the dashboard (chapter 4) and read the Not found panel top to bottom. On the lab's log it is two entries; on a real site it is your broken internal links, the page you renamed last spring, and the old URL other sites still point to — each with a hit count that ranks your fixing order. Work it monthly: fix the source link, redirect the old address, or accept the entry (scanners probing for files you never had belong to the third kind — a real log's not-found panel always contains some guests you did not invite and do not need to feed). Check: next month's panel is shorter, or you can say why each survivor stays. (Transcript t03 for the raw material, t04 for the panel as data.)

3. The bot census

Shape: how much of your traffic was never human?

Read the browsers panel as data:

goaccess access.log --log-format=COMBINED -o report.json

and look at the browsers rows. The lab's answer: Crawlers 4 of 27 hits — the Googlebot-fingerprint requests — with curl's 3 more under Others. A real site's census usually surprises its owner: search engines are the polite minority of robot traffic, and the rest is scrapers, uptime probes and scanners, all wearing user-agent strings that may lie about what they are. Treat the panel as claims, not identities — the string is self-reported, and chapter 12's limits apply. Check: the browser counts sum to the total; the crawler share is a number you can watch month to month. (Transcript t04.)

4. Before and after

Shape: did the change work?

You moved a page, fixed a link, blocked a bot. Compare two windows by giving GoAccess each window's lines (chapter 8) and diffing the JSON summaries:

grep 'guide.html' before.log | goaccess - --log-format=COMBINED -o before.json
grep 'guide.html' after.log  | goaccess - --log-format=COMBINED -o after.json

On the lab's log the "before" report is the 6-line guide-page world of chapter 8; an "after" with the 404s fixed would show the not-found count fall to zero in its window. Check: same filter both sides, same format flags, and the comparison names its windows — an unnamed before/after is how honest people mislead themselves. (Transcripts t07, t08.)