Frederic Marchal

Show:

What's happening?

  • Followup: RE: Report by user (in old reports)

    The first command is not supposed to be run alone as it contains two undefined variables $user and $index that are replaced by empty strings. This is the reason for the ambiguous redirection. Moreover, since ".html" is not found, it outputs nothing. The error in the script is my fault. It is produced by the single quotes around the sed expression. Replace the single quotes by double quotes...

    2009-11-05 13:34:42 UTC in sarg

  • Followup: RE: Report by user (in old reports)

    Of course, I assumed your date would be formated as dd-mmm-yyyy. Here is the change to use the correct date. find export -name "$user.html" -exec sh -c 'p=$0 ; d=${p#export/} ; d=${d%%-*} ; d1=`echo "$d" | sed -e 's/\([0-9]*\)\([A-Z][a-z]*\)\([0-9]*\)/\3-\2-\1/'` ; date "+%s $d" --date "$d1" ' {} \; | sort -n | sed -e 's/[0-9]* //' >> $index I use a...

    2009-11-05 12:08:01 UTC in sarg

  • sarg

    fmarchal committed patchset 102 of module sarg to the sarg CVS repository, changing 1 files.

    2009-11-05 10:48:24 UTC in sarg

  • Followup: RE: SARG with Ubuntu Server 9.04

    According to the debug output of message 13, a report was generated in /var/www/squid-reports/Daily/2009Nov05-2009Nov05 for one user 192.168.10.128 and sarg completed successfully. I could not spot any anomalies in the output you provide. Can you verify that the report is indeed in /var/www/squid-reports/Daily/2009Nov05-2009Nov05 and that a valid index.html exists in...

    2009-11-05 07:55:52 UTC in sarg

  • Followup: RE: Report by user (in old reports)

    To remove the last directory, run this command: find Daily -mindepth 2 -maxdepth 2 -type d -name "USER" -exec sh -c ' tgt="export/${0#Daily/}" ; tgt=${tgt%/*} ; mkdir -p "$tgt" ; cp -a "$0" "$tgt" ' {} \; The second assignment to "tgt" will remove everything after the last /, that is, it will remove the trailing user name. You can list the html files for user USER with this command:

    2009-11-05 07:37:53 UTC in sarg

  • Followup: RE: Report by user (in old reports)

    Let's see if I do understand correctly: you have the daily HTML reports of all the users and you want to publish or export the reports of some users. You don't have the access.log files that were used to produce the reports. Is that right ? I know of no tool to produce a full report entirely automatically but here is a shell command to export the reports for user *filteruser* from the daily...

    2009-11-04 14:22:34 UTC in sarg

  • Followup: RE: SARG with Ubuntu Server 9.04

    You may also make a copy of sarg-reports and add the two flags -x and -z after the call to sarg in today() like this: today () { DAILYOUT=$HTMLOUT/$DAILY mkdir -p $DAILYOUT create_index_html $SARG -x -z -f $CONFIG -d $TODAY -o $DAILYOUT >$ERRORS 2>&1 exclude_from_log } You will see what sarg thinks of the options that are...

    2009-11-04 10:58:23 UTC in sarg

  • Followup: RE: SARG with Ubuntu Server 9.04

    Can you run sarg-reports in debug mode with this command: bash -x /usr/sbin/sarg-reports today It will output every line it executes. The interesting line is the one running sarg. Look for the configuration file it uses (option -f) and the output directory (option -o). Do they correspond to what you expect ? Review your /etc/squid/sarg-reports.conf for the correct options...

    2009-11-04 10:54:25 UTC in sarg

  • Followup: RE: SARG with Ubuntu Server 9.04

    **sarg-reports today** builds today's report while **sarg-reports daily** creates yesterday's report. It takes its name from *cron.daily* that should produce the report of the last complete day, that is yesterday. **sarg -x -z** produces a single report with every line from the access.log file irrespective of the date. If your access.log file is rotated daily, your report will contain only...

    2009-11-04 10:38:37 UTC in sarg

  • Followup: RE: generating a report with SARG

    It only works if your user is authenticated and reported as such by squid in the access.log. In that case, simply call sarg with option -u followed by the user's ID. If your users are not authenticated and are identified by their IP address in the reports, then the current version of sarg cannot filter them as the filter is applied before the empty user name is replaced by the IP address...

    2009-11-04 10:19:52 UTC in sarg

About Me

  • 2002-12-11 (7 years ago)
  • 666872
  • fmarchal (My Site)
  • Frederic Marchal

Send me a message