Re: [squid-users] SARG: The date range passed as argument is not formatted as dd/mm/yyyy-dd/mm/yyyy

From: chinner999 <chinner999_at_gmail.com>
Date: Tue, 19 Jul 2011 13:30:18 -0600

Hi guys,
That worked.

I was missing a "-" in the 2nd line of the /usr/sbin/sarg-daily-report

TODAY=$(date +%d/%m/%Y)
YESTERDAY=$(date --date "1day ago" +%d/%m/%Y)
sarg /var/log/squid3/access.log -o /var/www/squid-reports/daily -z -d $YESTERDAY-$TODAY
/usr/sbin/squid3 -k rotate
exit 0

I modified sarg-weekly-report and sarg-monthly-report accordingly.

---- On Tue, 19 Jul 2011 00:26:00 -0600 Helmut Hullen wrote ----

>Hallo, chinner999,
>
>Du meintest am 18.07.11:
>
>> /usr/sbin/sarg-daily-report
>
>> TODAY=$(date +%YYYY/%m/%d)
>> YESTERDAY=$(date -date "1 day ago" +%YYYY/%m/%d)
>
> --date
>
>Viele Gruesse!
>Helmut
>
Received on Tue Jul 19 2011 - 19:30:27 MDT

This archive was generated by hypermail 2.2.0 : Wed Jul 20 2011 - 12:00:03 MDT