SARG-REPORTS(1)
β¨ 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,EXCLUDELOG1andEXCLUDELOG2are 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 ππβ¨
π¦ where this page comes from
- debian bookworm: sarg 2.4.0-3 Β· GPL-2.0-or-later
- debian trixie: sarg 2.4.0-4+b1 Β· GPL-2.0-or-later
- ubuntu jammy: sarg 2.4.0-1ubuntu4
- ubuntu noble: sarg 2.4.0-3 Β· GPL-2.0-or-later
- ubuntu questing: sarg 2.4.0-4
- ubuntu resolute: sarg 2.4.0-4build1 Β· GPL-2.0-or-later
- ubuntu stonking: sarg 2.4.0-4build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms