4 # Where is the access.log file
7 access_log /var/log/squid/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/sarg/fonts/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
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
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 /srv/web/ipfire/html/sarg
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.
169 #useragent_log /var/log/squid/user_agent.log
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
228 # Mail command to use to send reports via SMTP. Sarg calls it like this:
229 # mail_utility -s "SARG report, date" "output_email" <"mail_content"
231 # Therefore, it is possible to add more arguments to the command by specifying them
234 # If you need too, you can use a shell script to process the content of /dev/stdin
235 # (/dev/stdin is the mail_content passed by sarg to the script) and call whatever
236 # command you like. It is not limited to mailing the report via SMTP.
238 # Don't forget to quote the command if necessary (i.e. if the path contains
239 # characters that must be quoted).
243 # TAG: topsites_num n
244 # How many sites in topsites report.
248 # TAG: topsites_sort_order CONNECT|BYTES A|D
249 # Sort for topsites report, where A=Ascendent, D=Descendent
251 #topsites_sort_order CONNECT D
253 # TAG: index_sort_order A/D
254 # Sort for index.html, where A=Ascendent, D=Descendent
258 # TAG: exclude_codes file
259 # Ignore records with these codes. Eg.: NONE/400
260 # Write one code per line. Lines starting with a # are ignored.
261 # Only codes matching exactly one of the line is rejected. The
262 # comparison is not case sensitive.
264 #exclude_codes /usr/local/sarg/exclude_codes
266 # TAG: replace_index string
267 # Replace "index.html" in the main index file with this string
268 # If null "index.html" is used
270 #replace_index <?php echo str_replace(".", "_", $REMOTE_ADDR); echo ".html"; ?>
272 # TAG: max_elapsed milliseconds
273 # If elapsed time is recorded in log is greater than max_elapsed use 0 for elapsed time.
274 # Use 0 for no checking
276 #max_elapsed 28800000
279 # TAG: report_type type
280 # What kind of reports to generate.
281 # topusers - users, sites, times, bytes, connects, links to accessed sites, etc
282 # topsites - site, connect and bytes report
283 # sites_users - users and sites report
284 # users_sites - accessed sites by the user report
285 # date_time - bytes used per day and hour report
286 # denied - denied sites with full URL report
287 # auth_failures - autentication failures report
288 # site_user_time_date - sites, dates, times and bytes report
289 # downloads - downloads per user report
291 # Eg.: report_type topsites denied
293 report_type topusers topsites sites_users users_sites date_time denied auth_failures site_user_time_date downloads
295 # TAG: usertab filename
296 # You can change the "userid" or the "ip address" to be a real user name on the reports.
297 # If resolve_ip is active, the ip address is resolved before being looked up into this
298 # file. That is, if you want to map the ip address, be sure to set resolv_ip to no or
299 # the resolved name will be looked into the file instead of the ip address. Note that
300 # it can be used to resolve any ip address known to the dns and then map the unresolved
301 # ip addresses to a name found in the usertab file.
303 # userid name or ip address name
305 # SirIsaac Isaac Newton
306 # vinci Leonardo da Vinci
307 # 192.168.10.1 Karol Wojtyla
309 # Each line must be terminated with '\n'
310 # If usertab have value "ldap" (case ignoring), user names
311 # will be taken from LDAP server. This method as approaches for reception
312 # of usernames from Active Didectory
316 # TAG: LDAPHost hostname
317 # FQDN or IP address of host with LDAP service or AD DC
318 # default is '127.0.0.1'
322 # LDAP service port number
326 # TAG: LDAPBindDN CN=username,OU=group,DC=mydomain,DC=com
327 # DN of LDAP user, who is authorized to read user's names from LDAP base
328 # default is empty line
329 #LDAPBindDN cn=proxy,dc=mydomain,dc=local
331 # TAG: LDAPBindPW secret
332 # Password of DN, who is authorized to read user's names from LDAP base
333 # default is empty line
336 # TAG: LDAPBaseSearch OU=users,DC=mydomain,DC=com
338 # default is empty line
339 #LDAPBaseSearch ou=users,dc=mydomain,dc=local
341 # TAG: LDAPFilterSearch (uid=%s)
342 # User search filter by user's logins in LDAP
343 # First founded record will be used
344 # %s - will be changed to userlogins from access.log file
345 # filter string can have up to 5 '%s' tags
346 # default value is '(uid=%s)'
347 #LDAPFilterSearch (uid=%s)
349 # TAG: LDAPTargetAttr attributename
350 # Name of the attribute containing a name of the user
351 # default value is 'cn'
354 # TAG: long_url yes|no
355 # If yes, the full url is showed in report.
356 # If no, only the site will be showed
358 # YES option generate very big sort files and reports.
362 # TAG: date_time_by bytes|elap
363 # Date/Time reports show the downloaded volume or the elapsed time or both.
368 # ISO 8859 is a full series of 10 standardized multilingual single-byte coded (8bit)
369 # graphic character sets for writing in alphabetic languages
370 # You can use the following charsets:
371 # Latin1 - West European
372 # Latin2 - East European
373 # Latin3 - South European
374 # Latin4 - North European
388 # TAG: user_invalid_char "&/"
389 # Records that contain invalid characters in userid will be ignored by Sarg.
391 #user_invalid_char "&/"
393 # TAG: privacy yes|no
394 # privacy_string "***.***.***.***"
395 # privacy_string_color blue
396 # In some countries the sysadm cannot see the visited sites by a restrictive law.
397 # Using privacy yes the visited url will be changes by privacy_string and the link
398 # will be removed from reports.
401 #privacy_string "***.***.***.***"
402 #privacy_string_color blue
404 # TAG: include_users "user1:user2:...:usern"
405 # Reports will be generated only for listed users.
409 # TAG: exclude_string "string1:string2:...:stringn"
410 # Records from access.log file that contain one of listed strings will be ignored.
414 # TAG: show_successful_message yes|no
415 # Shows "Successful report generated on dir" at end of process.
417 #show_successful_message yes
419 # TAG: show_read_statistics yes|no
420 # Shows some reading statistics.
422 show_read_statistics yes
424 # TAG: topuser_fields
425 # Which fields must be in Topuser report.
427 #topuser_fields NUM DATE_TIME USERID CONNECT BYTES %BYTES IN-CACHE-OUT USED_TIME MILISEC %TIME TOTAL AVERAGE
429 # TAG: user_report_fields
430 # Which fields must be in User report.
432 #user_report_fields CONNECT BYTES %BYTES IN-CACHE-OUT USED_TIME MILISEC %TIME TOTAL AVERAGE
434 # TAG: bytes_in_sites_users_report yes|no
435 # Bytes field must be in Site & Users Report ?
437 #bytes_in_sites_users_report no
440 # How many users in topsites report. 0 = no limit
445 # Save the report results in a file to populate some database
449 # TAG: datafile_delimiter ";"
450 # ascii character to use as a field separator in datafile
452 #datafile_delimiter ";"
454 # TAG: datafile_fields all
455 # Which data fields must be in datafile
456 # user;date;time;url;connect;bytes;in_cache;out_cache;elapsed
458 #datafile_fields user;date;time;url;connect;bytes;in_cache;out_cache;elapsed
460 # TAG: datafile_url ip|name
461 # Saves the URL as ip or name in datafile
466 # The weekdays to take into account ( Sunday->0, Saturday->6 )
473 # The hours to take into account
475 #hours 7-12,14,16,18-20
479 # TAG: dansguardian_conf file
480 # DansGuardian.conf file path
481 # Generate reports from DansGuardian logs.
482 # Use 'none' to disable it.
483 # dansguardian_conf /usr/dansguardian/dansguardian.conf
485 #dansguardian_conf none
487 # TAG: dansguardian_filter_out_date on|off
488 # This option replaces dansguardian_ignore_date whose name was not appropriate with respect to its action.
489 # Note the change of parameter value compared with the old option.
490 # 'off' use the record even if its date is outside of the range found in the input log file.
491 # 'on' use the record only if its date is in the range found in the input log file.
493 #dansguardian_filter_out_date on
495 # TAG: squidguard_conf file
496 # path to squidGuard.conf file
497 # Generate reports from SquidGuard logs.
498 # Use 'none' to disable.
499 # You can use sarg -L filename to use an alternate squidGuard log.
500 # squidguard_conf /usr/local/squidGuard/squidGuard.conf
502 #squidguard_conf none
504 # TAG: redirector_log file
505 # the location of the web proxy redirector log such as one created by squidGuard or Rejik. The option
506 # may be repeated up to 64 times to read multiple files.
507 # If this option is specified, it takes precedence over squidguard_conf.
508 # The command line option -L override this option.
510 #redirector_log /usr/local/squidGuard/var/logs/urls.log
512 # TAG: redirector_filter_out_date on|off
513 # This option replaces squidguard_ignore_date and redirector_ignore_date whose names were not
514 # appropriate with respect to their action.
515 # Note the change of parameter value compared with the old options.
516 # 'off' use the record even if its date is outside of the range found in the input log file.
517 # 'on' use the record only if its date is in the range found in the input log file.
519 #redirector_filter_out_date on
521 # TAG: redirector_log_format
522 # Format string for web proxy redirector logs.
523 # This option was named squidguard_log_format before sarg 2.3.
524 # REJIK #year#-#mon#-#day# #hour# #list#:#tmp# #ip# #user# #tmp#/#tmp#/#url#/#end#
525 # SQUIDGUARD #year#-#mon#-#day# #hour# #tmp#/#list#/#tmp#/#tmp#/#url#/#tmp# #ip#/#tmp# #user# #end#
526 #redirector_log_format #year#-#mon#-#day# #hour# #tmp#/#list#/#tmp#/#tmp#/#url#/#tmp# #ip#/#tmp# #user# #end#
528 # TAG: show_sarg_info yes|no
529 # shows sarg information and site path on each report bottom
533 # TAG: show_sarg_logo yes|no
538 # TAG: parsed_output_log directory
539 # Saves the processed log in a sarg format after parsing the squid log file.
540 # This is a way to dump all of the data structures out, after parsing from
541 # the logs (presumably this data will be much smaller than the log files themselves),
542 # and pull them back in for later processing and merging with data from previous logs.
544 #parsed_output_log none
546 # TAG: parsed_output_log_compress /bin/gzip|/usr/bin/bzip2|nocompress
547 # Command to run to compress sarg parsed output log. It may contain
548 # options (such as -f to overwrite existing target file). The name of
549 # the file to compresse is provided at the end of this
550 # command line. Don't forget to quote things appropriately.
552 #parsed_output_log_compress /bin/gzip
554 # TAG: displayed_values bytes|abbreviation
555 # how the values will be displayed in reports.
556 # eg. bytes - 209.526
557 # abbreviation - 210K
559 #displayed_values bytes
562 # TAG: authfail_report_limit n
563 # TAG: denied_report_limit n
564 # TAG: siteusers_report_limit n
565 # TAG: squidguard_report_limit n
566 # TAG: user_report_limit n
567 # TAG: dansguardian_report_limit n
568 # TAG: download_report_limit n
569 # report limits (lines).
572 #authfail_report_limit 10
573 #denied_report_limit 10
574 #siteusers_report_limit 0
575 #squidguard_report_limit 10
576 #dansguardian_report_limit 10
577 #user_report_limit 10
578 #user_report_limit 50
580 # TAG: www_document_root dir
581 # Where is your Web DocumentRoot
582 # Sarg will create sarg-php directory with some PHP modules:
583 # - sarg-squidguard-block.php - add urls from user reports to squidGuard DB
585 #www_document_root /var/www/html
587 # TAG: block_it module_url
588 # This tag allow you to pass urls from user reports to a cgi or php module,
589 # to be blocked by some Squid acl
591 # Eg.: block_it /sarg-php/sarg-block-it.php
592 # sarg-block-it is a php that will append a url to a flat file.
593 # You must change /var/www/html/sarg-php/sarg-block-it to point to your file
594 # in $filename variable, and chown to a httpd owner.
596 # sarg will pass http://module_url?url=url
600 # TAG: external_css_file path
601 # Provide the path to an external css file to link into the HTML reports instead of
602 # the inline css written by sarg when this option is not set.
604 # In versions prior to 2.3, this used to be an absolute file name to
605 # a file to include verbatim in each HTML page but, as it takes a lot of
606 # space, version 2.3 switched to a link to an external css file.
607 # Therefore, this option must contain the HTTP server path on which a client
608 # browser may find the css file.
610 # Sarg use theses style classes:
612 # .info sarg information class, align=center
613 # .title_c title class, align=center
614 # .header_c header class, align:center
615 # .header_l header class, align:left
616 # .header_r header class, align:right
617 # .text text class, align:right
618 # .data table text class, align:right
619 # .data2 table text class, align:left
620 # .data3 table text class, align:center
623 # Sarg can be instructed to output the internal css it inline
624 # into the reports with this command:
628 # You can redirect the output to a file of your choice and edit
631 #external_css_file none
633 # TAG: user_authentication yes|no
634 # Allow user authentication in User Reports using .htaccess
636 # AuthUserTemplateFile - The template to use to create the
637 # .htaccess file. In the template, %u is replaced by the
638 # user's ID for which the report is generated. The path of the
639 # template is relative to the directory containing sarg
640 # configuration file.
642 # user_authentication no
643 # AuthUserTemplateFile sarg_htaccess
645 # TAG: download_suffix "suffix,suffix,...,suffix"
646 # file suffix to be considered as "download" in Download report.
647 # Use 'none' to disable.
649 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"
652 # The maximum number of open file descriptors to avoid "Too many open files" error message.
653 # You need to run sarg as root to use ulimit tag.
654 # If you run sarg with a low privilege user, set to 'none' to disable ulimit
658 # TAG: ntlm_user_format username|domainname+username
661 #ntlm_user_format domainname+username
663 # TAG: realtime_refresh_time num sec
664 # How many time to auto refresh the realtime report
667 # realtime_refresh_time 3
669 # TAG: realtime_access_log_lines num
670 # How many last lines to get from access.log file
672 # realtime_access_log_lines 1000
674 # TAG: realtime_types: GET,PUT,CONNECT,ICP_QUERY,POST
675 # Which records must be in realtime report.
677 # realtime_types GET,PUT,CONNECT
679 # TAG: realtime_unauthenticated_records: ignore|show
680 # What to do with unauthenticated records in realtime report.
682 # realtime_unauthenticated_records: show
684 # TAG: byte_cost value no_cost_limit
686 # Eg. byte_cost 0.01 100000000
687 # per byte cost = 0.01
688 # bytes with no cost = 100 Mb
691 # byte_cost 0.01 50000000
693 # TAG: squid24 on|off
694 # Compatilibity with squid version <= 2.4 when using emulate_http_log on