SARG-REPORTS(1)

πŸ“¦
version 2.4.0 Β· 2 versions
  • 2.4.0 Β· debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 2.4.0 Β· opensuse-leap 16.0
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ sarg-reports β€” the manual page, but make it cute ✨

okay bestie, so this is sarg-reports(1) from the General Commands Manual section, and it's genuinely one of those little scripts that carries your whole squid-reporting life. let's get into it πŸ’…


🌸 NAME 🌸

sarg-reports β€” the Daily/Weekly/Monthly squid usage reports creation tool. yes, that's the whole name. it does what it says on the tin, no cap.


πŸŽ€ SYNOPSIS πŸŽ€

sarg-reports [OPTIONS]

that's it. that's the whole vibe. one command, some options, reports happen ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so this manual page gives you the lowdown on the sarg-reports command. briefly. but thoroughly. both.

sarg-reports is a script written to automate the SARG reports and log management β€” and if you don't know, SARG is a powerful squid log analyzer. iconic behavior honestly.

Sarg itself gives the end user a generic interface to create reports based on the squid access log, running from the beginning of the log all the way to the current date. but sarg-reports?? it's useful because it lets you easily create and manage Daily, Weekly and Monthly reports. it's giving personal assistant energy. it's giving main character. 🫢


πŸ’– OPTIONS πŸ’–

a summary of options is included below. she's short, she's sweet, she's got five of them:

  • manual β€” create a Manual report πŸ“
  • today β€” create a Today report β˜€οΈ
  • daily β€” create a Daily report 🌈
  • weekly β€” create a Weely report 🌸 (yes bestie, the original manpage spells it "Weely", we keep the facts exactly as they are, no edits, that's the rule πŸ’€)
  • monthly β€” create a Monthly report πŸ‘‘

⏰ CRONTAB ⏰

if you want the reports to be generated automatically, drop the following lines in (and listen: the today report creation time depends mostly on your sarg server load average, so tune it, okay? don't just copy-paste and walk away πŸ™ˆ):

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
00 08-18/1 * * * sarg-reports today
00 00      * * * sarg-reports daily
00 01      * * 1 sarg-reports weekly
30 02      1 * * sarg-reports monthly
REMEMBER: if you use logrotate, configure it to retain enough logs to ensure availability of data for the longest period for which you need a report. Log rotation frequency is unimportant. See https://sourceforge.net/p/sarg/wiki/Keeping%20enough%20log%20to%20process/

This version of sarg-reports will use the log file defined in sarg.conf and also prior log files which have been rotated out of that location. so it's got range. it's got history. literally πŸ—‚οΈ


🧚 VARIABLES 🧚

check before using the sarg-reports that the following variables are set to file /etc/sarg/sarg-reports.conf β€” like, do the vibe check first, bestie, don't skip it:

  • SARG β€” the sarg executable location πŸ“
  • CONFIG β€” the sarg main configuration file location πŸ“
  • HTMLOUT β€” location where will be saved the reports πŸ’Ύ
  • LASTLOGDAILY β€” set the number of previous daily/today/manual reports to keep πŸ—“οΈ
  • LASTLOGWEEKLY β€” set the number of previous weekly reports to keep πŸ—“οΈ
  • LASTLOGMONTHLY β€” set the number of previous monthly reports to keep πŸ—“οΈ
  • PAGETITLE β€” the title of main index page 🏷️
  • LOGOIMG β€” image logo to view in main index page πŸ–ΌοΈ
  • LOGOLINK β€” HTTP web page link of logo πŸ”—
  • DAILY β€” word 'daily' translation, translate it to your language πŸ—£οΈ
  • WEEKLY β€” word 'weekly' translation, translate it to your language πŸ—£οΈ
  • MONTHLY β€” word 'monthly' translation, translate it to your language πŸ—£οΈ
  • EXCLUDELOG1 β€” exclude text from cron emails (normally, sarg, during cron activity, if it don't find any valid records, πŸ“­
  • EXCLUDELOG2 β€” it will output an error message (usually on 'today' reports). I don't want to be warned by email about this, so, i wrote the 'text' that will be never logged. This is useful to receive email of real problems only. πŸ“ͺ
  • EXCLUDELOG3 β€” this is debian-specific and used to filter the covered period message 🐧
ngl, EXCLUDELOG1 and EXCLUDELOG2 are kind of one sentence split across two variables in the original β€” and we're keeping it exactly that way, because the facts do not move. periodt. πŸ’…

πŸ‘‘ AUTHOR πŸ‘‘

sarg-reports was written by Ugo Viti <ugo.viti@initzero.it> πŸ’œ

This manual page was written by Juan Angulo Moreno <juan@apuntale.com>, for the Debian project (but may be used by others). slay 🫢


and that's the whole page, bestie!! this one's dated may 17, 2008 and it's the SARG-REPORTS(1) page β€” go forth and generate those daily/weekly/monthly reports, you absolute icon πŸŒŸπŸ’–βœ¨