]> git.ipfire.org Git - thirdparty/sarg.git/blob - sarg.conf
Extend the comment to describe the content of the file
[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: 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.
494 #
495 #squidguard_ignore_date off
496
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#
502
503 # TAG: show_sarg_info yes|no
504 # shows sarg information and site path on each report bottom
505 #
506 #show_sarg_info yes
507
508 # TAG: show_sarg_logo yes|no
509 # shows sarg logo
510 #
511 #show_sarg_logo yes
512
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.
518 #
519 #parsed_output_log none
520
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.
526 #
527 #parsed_output_log_compress /bin/gzip
528
529 # TAG: displayed_values bytes|abbreviation
530 # how the values will be displayed in reports.
531 # eg. bytes - 209.526
532 # abbreviation - 210K
533 #
534 #displayed_values bytes
535
536 # Report limits
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).
545 # '0' no limit
546 #
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
554
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
559 #
560 #www_document_root /var/www/html
561
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
565 #
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.
570 #
571 # sarg will pass http://module_url?url=url
572 #
573 #block_it none
574
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.
578 #
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.
584 #
585 # Sarg use theses style classes:
586 # .body body class
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
595 # .link link class
596 #
597 # There is a sample in /usr/local/sarg/etc/css.tpl
598 #
599 #external_css_file none
600
601 # TAG: user_authentication yes|no
602 # Allow user authentication in User Reports using .htaccess
603 # Parameters:
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.
609 #
610 # user_authentication no
611 # AuthUserTemplateFile sarg_htaccess
612
613 # TAG: download_suffix "suffix,suffix,...,suffix"
614 # file suffix to be considered as "download" in Download report.
615 # Use 'none' to disable.
616 #
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"
618
619 # TAG: ulimit n
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
623 #
624 #ulimit 20000
625
626 # TAG: ntlm_user_format username|domainname+username
627 # NTLM users format.
628 #
629 #ntlm_user_format domainname+username
630
631 # TAG: realtime_refresh_time num sec
632 # How many time to auto refresh the realtime report
633 # 0 = disable
634 #
635 # realtime_refresh_time 3
636
637 # TAG: realtime_access_log_lines num
638 # How many last lines to get from access.log file
639 #
640 # realtime_access_log_lines 1000
641
642 # TAG: realtime_types: GET,PUT,CONNECT,ICP_QUERY,POST
643 # Which records must be in realtime report.
644 #
645 # realtime_types GET,PUT,CONNECT
646
647 # TAG: realtime_unauthenticated_records: ignore|show
648 # What to do with unauthenticated records in realtime report.
649 #
650 # realtime_unauthenticated_records: show
651
652 # TAG: byte_cost value no_cost_limit
653 # Cost per byte.
654 # Eg. byte_cost 0.01 100000000
655 # per byte cost = 0.01
656 # bytes with no cost = 100 Mb
657 # 0 = disable
658 #
659 # byte_cost 0.01 50000000
660
661 # TAG: squid24 on|off
662 # Compatilibity with squid version <= 2.4 when using emulate_http_log on
663 #
664 # squid24 off