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

2011-07-19 Thread Helmut Hullen
Hallo, chinner999,

Du meintest am 18.07.11:

 /usr/sbin/sarg-daily-report

 TODAY=$(date +%/%m/%d)
 YESTERDAY=$(date -date 1 day ago +%/%m/%d)

   --date

Viele Gruesse!
Helmut


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

2011-07-19 Thread chinner999
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 +%/%m/%d) 
 YESTERDAY=$(date -date 1 day ago +%/%m/%d) 
 
 --date 
 
Viele Gruesse! 
Helmut 



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

2011-07-18 Thread Chad Naugle
Try ISO 8601 format, -MM-DD.  SARG is somewhat buggy.

 chinner999 chinner...@gmail.com 7/18/2011 4:22 PM 
Hi guys,
SARG question.

Setup
Ubuntu v10.00
Squid v2.2.7.1
Squid v3.1.6

Followed instructions here to setup SARG. 
(http://www.udiniqgeek.com/sarg_ubuntu.html) - updated /var/log/squid
to /var/log/squid3


sudo /usr/sbin/sarg-daily-report

I'm getting the following error.
SARG: The date range passed as argument is not formatted as
dd/mm/-dd/mm/.



/usr/sbin/sarg-daily-report

TODAY=$(date +%d/%m/%Y)
YESTERDAY=$(date –date “1 day 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

Any suggestions?

Thanks.


Travel Impressions made the following annotations
-
This message and any attachments are solely for the intended recipient
and may contain confidential or privileged information.  If you are not
the intended recipient, any disclosure, copying, use, or distribution of
the information included in this message and any attachments is
prohibited.  If you have received this communication in error, please
notify us by reply e-mail and immediately and permanently delete this
message and any attachments.
Thank you.


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

2011-07-18 Thread chinner999
No dice.  Tried your suggestion. Here are the results.

/usr/sbin/sarg-daily-report

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


sudo /usr/sbin/sarg-daily-report

I get the following.

date: extra operand `+%/%m/%d'
Try `date --help' for more information.
SARG: The date range passed as argument is not formated as 
dd/mm/-dd/mm/.


I also tried

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

sudo /usr/sbin/sarg-daily-report
date: extra operand `+%m/%d/%'
Try `date --help' for more information.
SARG: The date range passed as argument is not formated as 
dd/mm/-dd/mm/.


 On Mon, 18 Jul 2011 14:27:37 -0600 Chad Naugle  wrote  

Try ISO 8601 format, -MM-DD. SARG is somewhat buggy. 
 
 chinner999  7/18/2011 4:22 PM  
Hi guys, 
SARG question. 
 
Setup 
Ubuntu v10.00 
Squid v2.2.7.1 
Squid v3.1.6 
 
Followed instructions here to setup SARG. 
(http://www.udiniqgeek.com/sarg_ubuntu.html) - updated /var/log/squid 
to /var/log/squid3 
 
 
sudo /usr/sbin/sarg-daily-report 
 
I'm getting the following error. 
SARG: The date range passed as argument is not formatted as 
dd/mm/-dd/mm/. 
 
 
 
/usr/sbin/sarg-daily-report 
 
TODAY=$(date +%d/%m/%Y) 
YESTERDAY=$(date –date “1 day 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 
 
Any suggestions? 
 
Thanks. 
 
 
Travel Impressions made the following annotations 
- 
This message and any attachments are solely for the intended recipient 
and may contain confidential or privileged information. If you are not 
the intended recipient, any disclosure, copying, use, or distribution of 
the information included in this message and any attachments is 
prohibited. If you have received this communication in error, please 
notify us by reply e-mail and immediately and permanently delete this 
message and any attachments. 
Thank you. 



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

2011-07-18 Thread Amos Jeffries

chinner999  7/18/2011 4:22 PM 

Hi guys,
SARG question.

Setup
Ubuntu v10.00
Squid v2.2.7.1
Squid v3.1.6

Followed instructions here to setup SARG.
(http://www.udiniqgeek.com/sarg_ubuntu.html) - updated /var/log/squid
to /var/log/squid3


sudo /usr/sbin/sarg-daily-report

I'm getting the following error.
SARG: The date range passed as argument is not formatted as
dd/mm/-dd/mm/.



/usr/sbin/sarg-daily-report

TODAY=$(date +%d/%m/%Y)
YESTERDAY=$(date –date “1 day 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

Any suggestions?



Run the date command manually by itself and see what it is producing. 
Perhapse follow its helpfule message and use --help to find a format 
token that will work.


Amos