]> git.ipfire.org Git - thirdparty/sarg.git/blob - sarg.conf
Fix the creation of a report for only one user with command line option -u
[thirdparty/sarg.git] / sarg.conf
1 # sarg.conf
2 #
3 # TAG: access_log file
4 # Where is the access.log file
5 # sarg -l file
6 #
7 #access_log /usr/local/squid/var/logs/access.log
8
9 # TAG: graphs yes|no
10 # Use graphics where is possible.
11 # graph_days_bytes_bar_color blue|green|yellow|orange|brown|red
12 #
13 #graphs yes
14 #graph_days_bytes_bar_color orange
15
16 # TAG: graph_font
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.
19 #
20 #graph_font /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
21
22 # TAG: title
23 # Especify the title for html page.
24 #
25 #title "Squid User Access Reports"
26
27 # TAG: font_face
28 # Especify the font for html page.
29 #
30 #font_face Tahoma,Verdana,Arial
31
32 # TAG: header_color
33 # Especify the header color
34 #
35 #header_color darkblue
36
37 # TAG: header_bgcolor
38 # Especify the header bgcolor
39 #
40 #header_bgcolor blanchedalmond
41
42 # TAG: font_size
43 # Especify the text font size
44 #
45 #font_size 9px
46
47 # TAG: header_font_size
48 # Especify the header font size
49 #
50 #header_font_size 9px
51
52 # TAG: title_font_size
53 # Especify the title font size
54 #
55 #title_font_size 11px
56
57 # TAG: background_color
58 # TAG: background_color
59 # Html page background color
60 #
61 # background_color white
62
63 # TAG: text_color
64 # Html page text color
65 #
66 #text_color #000000
67
68 # TAG: text_bgcolor
69 # Html page text background color
70 #
71 #text_bgcolor lavender
72
73 # TAG: title_color
74 # Html page title color
75 #
76 #title_color green
77
78 # TAG: logo_image
79 # Html page logo.
80 #
81 #logo_image none
82
83 # TAG: logo_text
84 # Html page logo text.
85 #
86 #logo_text ""
87
88 # TAG: logo_text_color
89 # Html page logo texti color.
90 #
91 #logo_text_color #000000
92
93 # TAG: logo_image_size
94 # Html page logo image size.
95 # width height
96 #
97 #image_size 80 45
98
99 # TAG: background_image
100 # Html page background image
101 #
102 #background_image none
103
104 # TAG: password
105 # User password file used by Squid authentication scheme
106 # If used, generate reports just for that users.
107 #
108 #password none
109
110 # TAG: temporary_dir
111 # Temporary directory name for work files
112 # sarg -w dir
113 #
114 #temporary_dir /tmp
115
116 # TAG: output_dir
117 # The reports will be saved in that directory
118 # sarg -o dir
119 #
120 #output_dir /var/www/html/squid-reports
121
122 # TAG: output_email
123 # Email address to send the reports. If you use this tag, no html reports will be generated.
124 # sarg -e email
125 #
126 #output_email none
127
128 # TAG: resolve_ip yes/no
129 # Convert ip address to dns name
130 # sarg -n
131 #resolve_ip no
132
133 # TAG: user_ip yes/no
134 # Use Ip Address instead userid in reports.
135 # sarg -p
136 #user_ip no
137
138 # TAG: topuser_sort_field field normal/reverse
139 # Sort field for the Topuser Report.
140 # Allowed fields: USER CONNECT BYTES TIME
141 #
142 #topuser_sort_field BYTES reverse
143
144 # TAG: user_sort_field field normal/reverse
145 # Sort field for the User Report.
146 # Allowed fields: SITE CONNECT BYTES TIME
147 #
148 #user_sort_field BYTES reverse
149
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.
153 #
154 #exclude_users none
155
156 # TAG: exclude_hosts file
157 # Hosts, domains or subnets will be excluded from reports.
158 #
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
163 #
164 #exclude_hosts none
165
166 # TAG: useragent_log file
167 # useragent.log file patch to generate useragent report.
168 #
169 #useragent_log none
170
171 # TAG: date_format
172 # Date format in reports: e (European=dd/mm/yy), u (American=mm/dd/yy), w (Weekly=yy.ww)
173 #
174 #date_format u
175
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.
179 #
180 #per_user_limit none
181
182 # TAG: lastlog n
183 # How many reports files must be keept in reports directory.
184 # The oldest report file will be automatically removed.
185 # 0 - no limit.
186 #
187 #lastlog 0
188
189 # TAG: remove_temp_files yes
190 # Remove temporary files: geral, usuarios, top, periodo from root report directory.
191 #
192 #remove_temp_files yes
193
194 # TAG: index yes|no|only
195 # Generate the main index.html.
196 # only - generate only the main index.html
197 #
198 #index yes
199
200 # TAG: index_tree date|file
201 # How to generate the index.
202 #
203 #index_tree file
204
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
208 #
209 #overwrite_report no
210
211 # TAG: records_without_userid ignore|ip|everybody
212 # What can I do with records without user id (no authentication) in access.log file ?
213 #
214 # ignore - This record will be ignored.
215 # ip - Use ip address instead. (default)
216 # everybody - Use "everybody" instead.
217 #
218 #records_without_userid ip
219
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
224 #
225 #use_comma no
226
227 # TAG: mail_utility mail|mailx
228 # Mail command to use to send reports via SMTP
229 #
230 #mail_utility mailx
231
232 # TAG: topsites_num n
233 # How many sites in topsites report.
234 #
235 #topsites_num 100
236
237 # TAG: topsites_sort_order CONNECT|BYTES A|D
238 # Sort for topsites report, where A=Ascendent, D=Descendent
239 #
240 #topsites_sort_order CONNECT D
241
242 # TAG: index_sort_order A/D
243 # Sort for index.html, where A=Ascendent, D=Descendent
244 #
245 #index_sort_order D
246
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.
252 #
253 #exclude_codes /usr/local/sarg/exclude_codes
254
255 # TAG: replace_index string
256 # Replace "index.html" in the main index file with this string
257 # If null "index.html" is used
258 #
259 #replace_index <?php echo str_replace(".", "_", $REMOTE_ADDR); echo ".html"; ?>
260
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
264 #
265 #max_elapsed 28800000
266 # 8 Hours
267
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
279 #
280 # Eg.: report_type topsites denied
281 #
282 #report_type topusers topsites sites_users users_sites date_time denied auth_failures site_user_time_date downloads
283
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.
291 # Table syntax:
292 # userid name or ip address name
293 # Eg:
294 # SirIsaac Isaac Newton
295 # vinci Leonardo da Vinci
296 # 192.168.10.1 Karol Wojtyla
297 #
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
302 #
303 #usertab none
304
305 # TAG: LDAPHost hostname
306 # FQDN or IP address of host with LDAP service or AD DC
307 # default is '127.0.0.1'
308 #LDAPHost 127.0.0.1
309
310 # TAG: LDAPPort port
311 # LDAP service port number
312 # default is '389'
313 #LDAPPort 389
314
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
319
320 # TAG: LDAPBindPW secret
321 # Password of DN, who is authorized to read user's names from LDAP base
322 # default is empty line
323 #LDAPBindPW secret
324
325 # TAG: LDAPBaseSearch OU=users,DC=mydomain,DC=com
326 # LDAP search base
327 # default is empty line
328 #LDAPBaseSearch ou=users,dc=mydomain,dc=local
329
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
337
338 # TAG: LDAPTargetAttr attributename
339 # Name of the attribute containing a name of the user
340 # default value is 'cn'
341 #LDAPTargetAttr cn
342
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
346 #
347 # YES option generate very big sort files and reports.
348 #
349 #long_url no
350
351 # TAG: date_time_by bytes|elap
352 # Date/Time reports will use bytes or elapsed time?
353 #
354 #date_time_by elap
355
356 # TAG: charset name
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
364 # Cyrillic
365 # Arabic
366 # Greek
367 # Hebrew
368 # Latin5 - Turkish
369 # Latin6
370 # Windows-1251
371 # Japan
372 # Koi8-r
373 # UTF-8
374 #
375 #charset Latin1
376
377 # TAG: user_invalid_char "&/"
378 # Records that contain invalid characters in userid will be ignored by Sarg.
379 #
380 #user_invalid_char "&/"
381
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.
388 #
389 #privacy no
390 #privacy_string "***.***.***.***"
391 #privacy_string_color blue
392
393 # TAG: include_users "user1:user2:...:usern"
394 # Reports will be generated only for listed users.
395 #
396 #include_users none
397
398 # TAG: exclude_string "string1:string2:...:stringn"
399 # Records from access.log file that contain one of listed strings will be ignored.
400 #
401 #exclude_string none
402
403 # TAG: show_successful_message yes|no
404 # Shows "Successful report generated on dir" at end of process.
405 #
406 #show_successful_message yes
407
408 # TAG: show_read_statistics yes|no
409 # Shows some reading statistics.
410 #
411 #show_read_statistics yes
412
413 # TAG: topuser_fields
414 # Which fields must be in Topuser report.
415 #
416 #topuser_fields NUM DATE_TIME USERID CONNECT BYTES %BYTES IN-CACHE-OUT USED_TIME MILISEC %TIME TOTAL AVERAGE
417
418 # TAG: user_report_fields
419 # Which fields must be in User report.
420 #
421 #user_report_fields CONNECT BYTES %BYTES IN-CACHE-OUT USED_TIME MILISEC %TIME TOTAL AVERAGE
422
423 # TAG: bytes_in_sites_users_report yes|no
424 # Bytes field must be in Site & Users Report ?
425 #
426 #bytes_in_sites_users_report no
427
428 # TAG: topuser_num n
429 # How many users in topsites report. 0 = no limit
430 #
431 #topuser_num 0
432
433 # TAG: datafile file
434 # Save the report results in a file to populate some database
435 #
436 #datafile none
437
438 # TAG: datafile_delimiter ";"
439 # ascii character to use as a field separator in datafile
440 #
441 #datafile_delimiter ";"
442
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
446 #
447 #datafile_fields user;date;time;url;connect;bytes;in_cache;out_cache;elapsed
448
449 # TAG: datafile_url ip|name
450 # Saves the URL as ip or name in datafile
451 #
452 #datafile_url ip
453
454 # TAG: weekdays
455 # The weekdays to take account ( Sunday->0, Saturday->6 )
456 # Example:
457 #weekdays 1-3,5
458 # Default:
459 #weekdays 0-6
460
461 # TAG: hours
462 # The hours to take account
463 # Example:
464 #hours 7-12,14,16,18-20
465 # Default:
466 #hours 0-23
467
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
473 #
474 #dansguardian_conf none
475
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.
479 #
480 #dansguardian_ignore_date off
481
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
488 #
489 #squidguard_conf none
490
491 # TAG: redirector_log file
492 # the location of the web proxy redirector log such as one created by squidGuard or Rejik. The option
493 # may be repeated up to 64 times to read multiple files.
494 # If this option is specified, it takes precedence over squidguard_conf.
495 # The command line option -L override this option.
496 #
497 #redirector_log /usr/local/squidGuard/var/logs/urls.log
498
499 # TAG: redirector_ignore_date on|off
500 # was named squidguard_ignore_date before sarg 2.3 but was renamed as it is not specific to squidGuard.
501 # Set to 'on' to use the record even if the date is different from the date in the access log file.
502 # Set to 'off' to use the record only if the date is within the range found in the access log file.
503 #
504 #redirector_ignore_date off
505
506 # TAG: redirector_log_format
507 # Format string for web proxy redirector logs.
508 # This option was named squidguard_log_format before sarg 2.3.
509 # REJIK #year#-#mon#-#day# #hour# #list#:#tmp# #ip# #user# #tmp#/#tmp#/#url#/#end#
510 # SQUIDGUARD #year#-#mon#-#day# #hour# #tmp#/#list#/#tmp#/#tmp#/#url#/#tmp# #ip#/#tmp# #user# #end#
511 #redirector_log_format #year#-#mon#-#day# #hour# #tmp#/#list#/#tmp#/#tmp#/#url#/#tmp# #ip#/#tmp# #user# #end#
512
513 # TAG: show_sarg_info yes|no
514 # shows sarg information and site path on each report bottom
515 #
516 #show_sarg_info yes
517
518 # TAG: show_sarg_logo yes|no
519 # shows sarg logo
520 #
521 #show_sarg_logo yes
522
523 # TAG: parsed_output_log directory
524 # Saves the processed log in a sarg format after parsing the squid log file.
525 # This is a way to dump all of the data structures out, after parsing from
526 # the logs (presumably this data will be much smaller than the log files themselves),
527 # and pull them back in for later processing and merging with data from previous logs.
528 #
529 #parsed_output_log none
530
531 # TAG: parsed_output_log_compress /bin/gzip|/usr/bin/bzip2|nocompress
532 # Command to run to compress sarg parsed output log. It may contain
533 # options (such as -f to overwrite existing target file). The name of
534 # the file to compresse is provided at the end of this
535 # command line. Don't forget to quote things appropriately.
536 #
537 #parsed_output_log_compress /bin/gzip
538
539 # TAG: displayed_values bytes|abbreviation
540 # how the values will be displayed in reports.
541 # eg. bytes - 209.526
542 # abbreviation - 210K
543 #
544 #displayed_values bytes
545
546 # Report limits
547 # TAG: authfail_report_limit n
548 # TAG: denied_report_limit n
549 # TAG: siteusers_report_limit n
550 # TAG: squidguard_report_limit n
551 # TAG: user_report_limit n
552 # TAG: dansguardian_report_limit n
553 # TAG: download_report_limit n
554 # report limits (lines).
555 # '0' no limit
556 #
557 #authfail_report_limit 10
558 #denied_report_limit 10
559 #siteusers_report_limit 0
560 #squidguard_report_limit 10
561 #dansguardian_report_limit 10
562 #user_report_limit 10
563 #user_report_limit 50
564
565 # TAG: www_document_root dir
566 # Where is your Web DocumentRoot
567 # Sarg will create sarg-php directory with some PHP modules:
568 # - sarg-squidguard-block.php - add urls from user reports to squidGuard DB
569 #
570 #www_document_root /var/www/html
571
572 # TAG: block_it module_url
573 # This tag allow you to pass urls from user reports to a cgi or php module,
574 # to be blocked by some Squid acl
575 #
576 # Eg.: block_it /sarg-php/sarg-block-it.php
577 # sarg-block-it is a php that will append a url to a flat file.
578 # You must change /var/www/html/sarg-php/sarg-block-it to point to your file
579 # in $filename variable, and chown to a httpd owner.
580 #
581 # sarg will pass http://module_url?url=url
582 #
583 #block_it none
584
585 # TAG: external_css_file path
586 # This tag allow internal sarg css override by providing the name of
587 # the css file to link into each HTML page.
588 #
589 # In versions prior to 2.3, this used to be an absolute file name to
590 # a file to include verbatim in each HTML but as it takes a lot of
591 # spaces, version 2.3 switched to a link to an external css file.
592 # Therefore, it must be the HTTP server path on which a client browser
593 # may find the css file.
594 #
595 # Sarg use theses style classes:
596 # .body body class
597 # .info sarg information class, align=center
598 # .title title class, align=center
599 # .header header class, align:left
600 # .header2 header class, align:right
601 # .header3 header class, align:right
602 # .text text class, align:left
603 # .data table text class, align:right
604 # .data2 table text class, align:right, border colors
605 # .link link class
606 #
607 # There is a sample in /usr/local/sarg/etc/css.tpl
608 #
609 #external_css_file none
610
611 # TAG: user_authentication yes|no
612 # Allow user authentication in User Reports using .htaccess
613 # Parameters:
614 # AuthUserTemplateFile - The template to use to create the
615 # .htaccess file. In the template, %u is replaced by the
616 # user's ID for which the report is generated. The path of the
617 # template is relative to the directory containing sarg
618 # configuration file.
619 #
620 # user_authentication no
621 # AuthUserTemplateFile sarg_htaccess
622
623 # TAG: download_suffix "suffix,suffix,...,suffix"
624 # file suffix to be considered as "download" in Download report.
625 # Use 'none' to disable.
626 #
627 #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"
628
629 # TAG: ulimit n
630 # The maximum number of open file descriptors to avoid "Too many open files" error message.
631 # You need to run sarg as root to use ulimit tag.
632 # If you run sarg with a low privilege user, set to 'none' to disable ulimit
633 #
634 #ulimit 20000
635
636 # TAG: ntlm_user_format username|domainname+username
637 # NTLM users format.
638 #
639 #ntlm_user_format domainname+username
640
641 # TAG: realtime_refresh_time num sec
642 # How many time to auto refresh the realtime report
643 # 0 = disable
644 #
645 # realtime_refresh_time 3
646
647 # TAG: realtime_access_log_lines num
648 # How many last lines to get from access.log file
649 #
650 # realtime_access_log_lines 1000
651
652 # TAG: realtime_types: GET,PUT,CONNECT,ICP_QUERY,POST
653 # Which records must be in realtime report.
654 #
655 # realtime_types GET,PUT,CONNECT
656
657 # TAG: realtime_unauthenticated_records: ignore|show
658 # What to do with unauthenticated records in realtime report.
659 #
660 # realtime_unauthenticated_records: show
661
662 # TAG: byte_cost value no_cost_limit
663 # Cost per byte.
664 # Eg. byte_cost 0.01 100000000
665 # per byte cost = 0.01
666 # bytes with no cost = 100 Mb
667 # 0 = disable
668 #
669 # byte_cost 0.01 50000000
670
671 # TAG: squid24 on|off
672 # Compatilibity with squid version <= 2.4 when using emulate_http_log on
673 #
674 # squid24 off