4 # Where is the access.log file
7 #access_log /usr/local/squid/var/logs/access.log
10 # Use graphics where is possible.
11 # graph_days_bytes_bar_color blue|green|yellow|orange|brown|red
14 #graph_days_bytes_bar_color orange
17 # The full path to the TTF font file to use to create the graphs. It is required
18 # if graphs is set to yes.
20 #graph_font /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
23 # Especify the title for html page.
25 #title "Squid User Access Reports"
28 # Especify the font for html page.
30 #font_face Tahoma,Verdana,Arial
33 # Especify the header color
35 #header_color darkblue
38 # Especify the header bgcolor
40 #header_bgcolor blanchedalmond
43 # Especify the text font size
47 # TAG: header_font_size
48 # Especify the header font size
52 # TAG: title_font_size
53 # Especify the title font size
57 # TAG: background_color
58 # TAG: background_color
59 # Html page background color
61 # background_color white
64 # Html page text color
69 # Html page text background color
71 #text_bgcolor lavender
74 # Html page title color
84 # Html page logo text.
88 # TAG: logo_text_color
89 # Html page logo texti color.
91 #logo_text_color #000000
93 # TAG: logo_image_size
94 # Html page logo image size.
99 # TAG: background_image
100 # Html page background image
102 #background_image none
105 # User password file used by Squid authentication scheme
106 # If used, generate reports just for that users.
111 # Temporary directory name for work files
117 # The reports will be saved in that directory
120 #output_dir /var/www/html/squid-reports
123 # Email address to send the reports. If you use this tag, no html reports will be generated.
128 # TAG: resolve_ip yes/no
129 # Convert ip address to dns name
133 # TAG: user_ip yes/no
134 # Use Ip Address instead userid in reports.
138 # TAG: topuser_sort_field field normal/reverse
139 # Sort field for the Topuser Report.
140 # Allowed fields: USER CONNECT BYTES TIME
142 #topuser_sort_field BYTES reverse
144 # TAG: user_sort_field field normal/reverse
145 # Sort field for the User Report.
146 # Allowed fields: SITE CONNECT BYTES TIME
148 #user_sort_field BYTES reverse
150 # TAG: exclude_users file
151 # users within the file will be excluded from reports.
152 # you can use indexonly to have only index.html file.
156 # TAG: exclude_hosts file
157 # Hosts, domains or subnets will be excluded from reports.
159 # Eg.: 192.168.10.10 - exclude ip address only
160 # 192.168.10.0/24 - exclude full C class
161 # s1.acme.foo - exclude hostname only
162 # *.acme.foo - exclude full domain name
166 # TAG: useragent_log file
167 # useragent.log file patch to generate useragent report.
172 # Date format in reports: e (European=dd/mm/yy), u (American=mm/dd/yy), w (Weekly=yy.ww)
176 # TAG: per_user_limit file MB
177 # Saves userid on file if download exceed n MB.
178 # This option allow you to disable user access if user exceed a download limit.
183 # How many reports files must be keept in reports directory.
184 # The oldest report file will be automatically removed.
189 # TAG: remove_temp_files yes
190 # Remove temporary files: geral, usuarios, top, periodo from root report directory.
192 #remove_temp_files yes
194 # TAG: index yes|no|only
195 # Generate the main index.html.
196 # only - generate only the main index.html
200 # TAG: index_tree date|file
201 # How to generate the index.
205 # TAG: overwrite_report yes|no
206 # yes - if report date already exist then will be overwrited.
207 # no - if report date already exist then will be renamed to filename.n, filename.n+1
211 # TAG: records_without_userid ignore|ip|everybody
212 # What can I do with records without user id (no authentication) in access.log file ?
214 # ignore - This record will be ignored.
215 # ip - Use ip address instead. (default)
216 # everybody - Use "everybody" instead.
218 #records_without_userid ip
220 # TAG: use_comma no|yes
221 # Use comma instead point in reports.
222 # Eg.: use_comma yes => 23,450,110
223 # use_comma no => 23.450.110
227 # TAG: mail_utility mail|mailx
228 # Mail command to use to send reports via SMTP
232 # TAG: topsites_num n
233 # How many sites in topsites report.
237 # TAG: topsites_sort_order CONNECT|BYTES A|D
238 # Sort for topsites report, where A=Ascendent, D=Descendent
240 #topsites_sort_order CONNECT D
242 # TAG: index_sort_order A/D
243 # Sort for index.html, where A=Ascendent, D=Descendent
247 # TAG: exclude_codes file
248 # Ignore records with these codes. Eg.: NONE/400
249 # Write one code per line. Lines starting with a # are ignored.
250 # Only codes matching exactly one of the line is rejected. The
251 # comparison is not case sensitive.
253 #exclude_codes /usr/local/sarg/exclude_codes
255 # TAG: replace_index string
256 # Replace "index.html" in the main index file with this string
257 # If null "index.html" is used
259 #replace_index <?php echo str_replace(".", "_", $REMOTE_ADDR); echo ".html"; ?>
261 # TAG: max_elapsed milliseconds
262 # If elapsed time is recorded in log is greater than max_elapsed use 0 for elapsed time.
263 # Use 0 for no checking
265 #max_elapsed 28800000
268 # TAG: report_type type
269 # What kind of reports to generate.
270 # topusers - users, sites, times, bytes, connects, links to accessed sites, etc
271 # topsites - site, connect and bytes report
272 # sites_users - users and sites report
273 # users_sites - accessed sites by the user report
274 # date_time - bytes used per day and hour report
275 # denied - denied sites with full URL report
276 # auth_failures - autentication failures report
277 # site_user_time_date - sites, dates, times and bytes report
278 # downloads - downloads per user report
280 # Eg.: report_type topsites denied
282 #report_type topusers topsites sites_users users_sites date_time denied auth_failures site_user_time_date downloads
284 # TAG: usertab filename
285 # You can change the "userid" or the "ip address" to be a real user name on the reports.
286 # If resolve_ip is active, the ip address is resolved before being looked up into this
287 # file. That is, if you want to map the ip address, be sure to set resolv_ip to no or
288 # the resolved name will be looked into the file instead of the ip address. Note that
289 # it can be used to resolve any ip address known to the dns and then map the unresolved
290 # ip addresses to a name found in the usertab file.
292 # userid name or ip address name
294 # SirIsaac Isaac Newton
295 # vinci Leonardo da Vinci
296 # 192.168.10.1 Karol Wojtyla
298 # Each line must be terminated with '\n'
299 # If usertab have value "ldap" (case ignoring), user names
300 # will be taken from LDAP server. This method as approaches for reception
301 # of usernames from Active Didectory
305 # TAG: LDAPHost hostname
306 # FQDN or IP address of host with LDAP service or AD DC
307 # default is '127.0.0.1'
311 # LDAP service port number
315 # TAG: LDAPBindDN CN=username,OU=group,DC=mydomain,DC=com
316 # DN of LDAP user, who is authorized to read user's names from LDAP base
317 # default is empty line
318 #LDAPBindDN cn=proxy,dc=mydomain,dc=local
320 # TAG: LDAPBindPW secret
321 # Password of DN, who is authorized to read user's names from LDAP base
322 # default is empty line
325 # TAG: LDAPBaseSearch OU=users,DC=mydomain,DC=com
327 # default is empty line
328 #LDAPBaseSearch ou=users,dc=mydomain,dc=local
330 # TAG: LDAPFilterSearch uid=%s
331 # User search filter by user's logins in LDAP
332 # First founded record will be used
333 # %s - will be changed to userlogins from access.log file
334 # filter string can have some tags '%s'
335 # default value is 'uid=%s'
336 #LDAPFilterSearch uid=%s
338 # TAG: LDAPTargetAttr attributename
339 # Name of the attribute containing a name of the user
340 # default value is 'cn'
343 # TAG: long_url yes|no
344 # If yes, the full url is showed in report.
345 # If no, only the site will be showed
347 # YES option generate very big sort files and reports.
351 # TAG: date_time_by bytes|elap
352 # Date/Time reports will use bytes or elapsed time?
357 # ISO 8859 is a full series of 10 standardized multilingual single-byte coded (8bit)
358 # graphic character sets for writing in alphabetic languages
359 # You can use the following charsets:
360 # Latin1 - West European
361 # Latin2 - East European
362 # Latin3 - South European
363 # Latin4 - North European
377 # TAG: user_invalid_char "&/"
378 # Records that contain invalid characters in userid will be ignored by Sarg.
380 #user_invalid_char "&/"
382 # TAG: privacy yes|no
383 # privacy_string "***.***.***.***"
384 # privacy_string_color blue
385 # In some countries the sysadm cannot see the visited sites by a restrictive law.
386 # Using privacy yes the visited url will be changes by privacy_string and the link
387 # will be removed from reports.
390 #privacy_string "***.***.***.***"
391 #privacy_string_color blue
393 # TAG: include_users "user1:user2:...:usern"
394 # Reports will be generated only for listed users.
398 # TAG: exclude_string "string1:string2:...:stringn"
399 # Records from access.log file that contain one of listed strings will be ignored.
403 # TAG: show_successful_message yes|no
404 # Shows "Successful report generated on dir" at end of process.
406 #show_successful_message yes
408 # TAG: show_read_statistics yes|no
409 # Shows some reading statistics.
411 #show_read_statistics yes
413 # TAG: topuser_fields
414 # Which fields must be in Topuser report.
416 #topuser_fields NUM DATE_TIME USERID CONNECT BYTES %BYTES IN-CACHE-OUT USED_TIME MILISEC %TIME TOTAL AVERAGE
418 # TAG: user_report_fields
419 # Which fields must be in User report.
421 #user_report_fields CONNECT BYTES %BYTES IN-CACHE-OUT USED_TIME MILISEC %TIME TOTAL AVERAGE
423 # TAG: bytes_in_sites_users_report yes|no
424 # Bytes field must be in Site & Users Report ?
426 #bytes_in_sites_users_report no
429 # How many users in topsites report. 0 = no limit
434 # Save the report results in a file to populate some database
438 # TAG: datafile_delimiter ";"
439 # ascii character to use as a field separator in datafile
441 #datafile_delimiter ";"
443 # TAG: datafile_fields all
444 # Which data fields must be in datafile
445 # user;date;time;url;connect;bytes;in_cache;out_cache;elapsed
447 #datafile_fields user;date;time;url;connect;bytes;in_cache;out_cache;elapsed
449 # TAG: datafile_url ip|name
450 # Saves the URL as ip or name in datafile
455 # The weekdays to take account ( Sunday->0, Saturday->6 )
462 # The hours to take account
464 #hours 7-12,14,16,18-20
468 # TAG: dansguardian_conf file
469 # DansGuardian.conf file path
470 # Generate reports from DansGuardian logs.
471 # Use 'none' to disable it.
472 # dansguardian_conf /usr/dansguardian/dansguardian.conf
474 #dansguardian_conf none
476 # TAG: dansguardian_ignore_date on|off
477 # 'on' must use the record even the date range is different from the used in squid access.log file.
478 # 'off' must use the record only if the date range is in the irange used in squid access.log file.
480 #dansguardian_ignore_date off
482 # TAG: squidguard_conf file
483 # path to squidGuard.conf file
484 # Generate reports from SquidGuard logs.
485 # Use 'none' to disable.
486 # You can use sarg -L filename to use an alternate squidGuard log.
487 # squidguard_conf /usr/local/squidGuard/squidGuard.conf
489 #squidguard_conf none
491 # TAG: squidguard_ignore_date on|off
492 # Use 'on' use the record even the date range is different from the used squid access.log file.
493 # Use 'off' use the record only if the date range is in the used squid access.log file.
495 #squidguard_ignore_date off
497 # TAG: squidguard_log_format
498 # Format string SquidGuard logs.
499 # REJIK #year#-#mon#-#day# #hour# #list#:#tmp# #ip# #user# #tmp#/#tmp#/#url#/#end#
500 # SQUIDGUARD #year#-#mon#-#day# #hour# #tmp#/#list#/#tmp#/#tmp#/#url#/#tmp# #ip#/#tmp# #user# #end#
501 #squidguard_log_format #year#-#mon#-#day# #hour# #tmp#/#list#/#tmp#/#tmp#/#url#/#tmp# #ip#/#tmp# #user# #end#
503 # TAG: show_sarg_info yes|no
504 # shows sarg information and site path on each report bottom
508 # TAG: show_sarg_logo yes|no
513 # TAG: parsed_output_log directory
514 # Saves the processed log in a sarg format after parsing the squid log file.
515 # This is a way to dump all of the data structures out, after parsing from
516 # the logs (presumably this data will be much smaller than the log files themselves),
517 # and pull them back in for later processing and merging with data from previous logs.
519 #parsed_output_log none
521 # TAG: parsed_output_log_compress /bin/gzip|/usr/bin/bzip2|nocompress
522 # Command to run to compress sarg parsed output log. It may contain
523 # options (such as -f to overwrite existing target file). The name of
524 # the file to compresse is provided at the end of this
525 # command line. Don't forget to quote things appropriately.
527 #parsed_output_log_compress /bin/gzip
529 # TAG: displayed_values bytes|abbreviation
530 # how the values will be displayed in reports.
531 # eg. bytes - 209.526
532 # abbreviation - 210K
534 #displayed_values bytes
537 # TAG: authfail_report_limit n
538 # TAG: denied_report_limit n
539 # TAG: siteusers_report_limit n
540 # TAG: squidguard_report_limit n
541 # TAG: user_report_limit n
542 # TAG: dansguardian_report_limit n
543 # TAG: download_report_limit n
544 # report limits (lines).
547 #authfail_report_limit 10
548 #denied_report_limit 10
549 #siteusers_report_limit 0
550 #squidguard_report_limit 10
551 #dansguardian_report_limit 10
552 #user_report_limit 10
553 #user_report_limit 50
555 # TAG: www_document_root dir
556 # Where is your Web DocumentRoot
557 # Sarg will create sarg-php directory with some PHP modules:
558 # - sarg-squidguard-block.php - add urls from user reports to squidGuard DB
560 #www_document_root /var/www/html
562 # TAG: block_it module_url
563 # This tag allow you to pass urls from user reports to a cgi or php module,
564 # to be blocked by some Squid acl
566 # Eg.: block_it /sarg-php/sarg-block-it.php
567 # sarg-block-it is a php that will append a url to a flat file.
568 # You must change /var/www/html/sarg-php/sarg-block-it to point to your file
569 # in $filename variable, and chown to a httpd owner.
571 # sarg will pass http://module_url?url=url
575 # TAG: external_css_file path
576 # This tag allow internal sarg css override by providing the name of
577 # the css file to link into each HTML page.
579 # In versions prior to 2.3, this used to be an absolute file name to
580 # a file to include verbatim in each HTML but as it takes a lot of
581 # spaces, version 2.3 switched to a link to an external css file.
582 # Therefore, it must be the HTTP server path on which a client browser
583 # may find the css file.
585 # Sarg use theses style classes:
587 # .info sarg information class, align=center
588 # .title title class, align=center
589 # .header header class, align:left
590 # .header2 header class, align:right
591 # .header3 header class, align:right
592 # .text text class, align:left
593 # .data table text class, align:right
594 # .data2 table text class, align:right, border colors
597 # There is a sample in /usr/local/sarg/etc/css.tpl
599 #external_css_file none
601 # TAG: user_authentication yes|no
602 # Allow user authentication in User Reports using .htaccess
604 # AuthUserTemplateFile - The template to use to create the
605 # .htaccess file. In the template, %u is replaced by the
606 # user's ID for which the report is generated. The path of the
607 # template is relative to the directory containing sarg
608 # configuration file.
610 # user_authentication no
611 # AuthUserTemplateFile sarg_htaccess
613 # TAG: download_suffix "suffix,suffix,...,suffix"
614 # file suffix to be considered as "download" in Download report.
615 # Use 'none' to disable.
617 #download_suffix "zip,arj,bzip,gz,ace,doc,iso,adt,bin,cab,com,dot,drv$,lha,lzh,mdb,mso,ppt,rtf,src,shs,sys,exe,dll,mp3,avi,mpg,mpeg"
620 # The maximum number of open file descriptors to avoid "Too many open files" error message.
621 # You need to run sarg as root to use ulimit tag.
622 # If you run sarg with a low privilege user, set to 'none' to disable ulimit
626 # TAG: ntlm_user_format username|domainname+username
629 #ntlm_user_format domainname+username
631 # TAG: realtime_refresh_time num sec
632 # How many time to auto refresh the realtime report
635 # realtime_refresh_time 3
637 # TAG: realtime_access_log_lines num
638 # How many last lines to get from access.log file
640 # realtime_access_log_lines 1000
642 # TAG: realtime_types: GET,PUT,CONNECT,ICP_QUERY,POST
643 # Which records must be in realtime report.
645 # realtime_types GET,PUT,CONNECT
647 # TAG: realtime_unauthenticated_records: ignore|show
648 # What to do with unauthenticated records in realtime report.
650 # realtime_unauthenticated_records: show
652 # TAG: byte_cost value no_cost_limit
654 # Eg. byte_cost 0.01 100000000
655 # per byte cost = 0.01
656 # bytes with no cost = 100 Mb
659 # byte_cost 0.01 50000000
661 # TAG: squid24 on|off
662 # Compatilibity with squid version <= 2.4 when using emulate_http_log on