]> git.ipfire.org Git - thirdparty/sarg.git/blame - sarg.conf
Ported r231 from branches/v2_2_7 (abort on long lines in access.log)
[thirdparty/sarg.git] / sarg.conf
CommitLineData
25697a35
GS
1# sarg.conf
2#
3# TAG: language
4# Available languages:
5# Bulgarian_windows1251
6# Catalan
7# Czech
d6e703cc 8# Czech_UTF8
25697a35
GS
9# Dutch
10# English
11# French
12# German
13# Greek
14# Hungarian
15# Indonesian
16# Italian
17# Japanese
18# Latvian
19# Polish
20# Portuguese
21# Romanian
22# Russian_koi8
e1dab6ef 23# Russian_UTF-8
25697a35
GS
24# Russian_windows1251
25# Serbian
26# Slovak
27# Spanish
28# Turkish
29#
30#language English
31
32# TAG: access_log file
33# Where is the access.log file
34# sarg -l file
35#
36#access_log /usr/local/squid/var/logs/access.log
37
38# TAG: graphs yes|no
39# Use graphics where is possible.
40# graph_days_bytes_bar_color blue|green|yellow|orange|brown|red
41#
42#graphs yes
43#graph_days_bytes_bar_color orange
44
45# TAG: title
46# Especify the title for html page.
47#
48#title "Squid User Access Reports"
49
50# TAG: font_face
51# Especify the font for html page.
52#
53#font_face Tahoma,Verdana,Arial
54
55# TAG: header_color
56# Especify the header color
57#
58#header_color darkblue
59
60# TAG: header_bgcolor
61# Especify the header bgcolor
62#
63#header_bgcolor blanchedalmond
64
65# TAG: font_size
66# Especify the text font size
67#
68#font_size 9px
69
70# TAG: header_font_size
71# Especify the header font size
72#
73#header_font_size 9px
74
75# TAG: title_font_size
76# Especify the title font size
77#
78#title_font_size 11px
79
80# TAG: background_color
81# TAG: background_color
82# Html page background color
83#
84# background_color white
85
86# TAG: text_color
87# Html page text color
88#
89#text_color #000000
90
91# TAG: text_bgcolor
92# Html page text background color
93#
94#text_bgcolor lavender
95
96# TAG: title_color
97# Html page title color
98#
99#title_color green
100
101# TAG: logo_image
102# Html page logo.
103#
104#logo_image none
105
106# TAG: logo_text
107# Html page logo text.
108#
109#logo_text ""
110
111# TAG: logo_text_color
112# Html page logo texti color.
113#
114#logo_text_color #000000
115
116# TAG: logo_image_size
117# Html page logo image size.
118# width height
119#
120#image_size 80 45
121
122# TAG: background_image
123# Html page background image
124#
125#background_image none
126
127# TAG: password
491b862f
GS
128# User password file used by Squid authentication scheme
129# If used, generate reports just for that users.
25697a35
GS
130#
131#password none
132
133# TAG: temporary_dir
134# Temporary directory name for work files
135# sarg -w dir
136#
137#temporary_dir /tmp
138
139# TAG: output_dir
140# The reports will be saved in that directory
141# sarg -o dir
142#
143#output_dir /var/www/html/squid-reports
144
145# TAG: output_email
146# Email address to send the reports. If you use this tag, no html reports will be generated.
147# sarg -e email
148#
149#output_email none
150
151# TAG: resolve_ip yes/no
152# Convert ip address to dns name
153# sarg -n
154#resolve_ip no
155
156# TAG: user_ip yes/no
157# Use Ip Address instead userid in reports.
158# sarg -p
159#user_ip no
160
161# TAG: topuser_sort_field field normal/reverse
162# Sort field for the Topuser Report.
163# Allowed fields: USER CONNECT BYTES TIME
164#
165#topuser_sort_field BYTES reverse
166
167# TAG: user_sort_field field normal/reverse
168# Sort field for the User Report.
169# Allowed fields: SITE CONNECT BYTES TIME
170#
171#user_sort_field BYTES reverse
172
173# TAG: exclude_users file
174# users within the file will be excluded from reports.
175# you can use indexonly to have only index.html file.
176#
177#exclude_users none
178
179# TAG: exclude_hosts file
180# Hosts, domains or subnets will be excluded from reports.
181#
43f18f45
FM
182# Eg.: 192.168.10.10 - exclude ip address only
183# 192.168.10.0/24 - exclude full C class
184# s1.acme.foo - exclude hostname only
185# *.acme.foo - exclude full domain name
25697a35
GS
186#
187#exclude_hosts none
188
189# TAG: useragent_log file
491b862f 190# useragent.log file patch to generate useragent report.
25697a35
GS
191#
192#useragent_log none
193
194# TAG: date_format
195# Date format in reports: e (European=dd/mm/yy), u (American=mm/dd/yy), w (Weekly=yy.ww)
196#
197#date_format u
198
199# TAG: per_user_limit file MB
200# Saves userid on file if download exceed n MB.
201# This option allow you to disable user access if user exceed a download limit.
202#
203#per_user_limit none
204
205# TAG: lastlog n
206# How many reports files must be keept in reports directory.
207# The oldest report file will be automatically removed.
208# 0 - no limit.
209#
210#lastlog 0
211
212# TAG: remove_temp_files yes
213# Remove temporary files: geral, usuarios, top, periodo from root report directory.
214#
215#remove_temp_files yes
216
217# TAG: index yes|no|only
218# Generate the main index.html.
219# only - generate only the main index.html
220#
221#index yes
222
491b862f
GS
223# TAG: index_tree date|file
224# How to generate the index.
225#
226#index_tree file
227
25697a35
GS
228# TAG: overwrite_report yes|no
229# yes - if report date already exist then will be overwrited.
230# no - if report date already exist then will be renamed to filename.n, filename.n+1
231#
232#overwrite_report no
233
234# TAG: records_without_userid ignore|ip|everybody
235# What can I do with records without user id (no authentication) in access.log file ?
236#
237# ignore - This record will be ignored.
238# ip - Use ip address instead. (default)
239# everybody - Use "everybody" instead.
240#
241#records_without_userid ip
242
243# TAG: use_comma no|yes
244# Use comma instead point in reports.
245# Eg.: use_comma yes => 23,450,110
246# use_comma no => 23.450.110
247#
248#use_comma no
249
250# TAG: mail_utility mail|mailx
251# Mail command to use to send reports via SMTP
252#
253#mail_utility mailx
254
255# TAG: topsites_num n
256# How many sites in topsites report.
257#
258#topsites_num 100
259
260# TAG: topsites_sort_order CONNECT|BYTES A|D
261# Sort for topsites report, where A=Ascendent, D=Descendent
262#
263#topsites_sort_order CONNECT D
264
265# TAG: index_sort_order A/D
266# Sort for index.html, where A=Ascendent, D=Descendent
267#
268#index_sort_order D
269
270# TAG: exclude_codes file
271# Ignore records with these codes. Eg.: NONE/400
272#
273#exclude_codes /usr/local/sarg/exclude_codes
274
275# TAG: replace_index string
276# Replace "index.html" in the main index file with this string
277# If null "index.html" is used
278#
279#replace_index <?php echo str_replace(".", "_", $REMOTE_ADDR); echo ".html"; ?>
280
281# TAG: max_elapsed milliseconds
282# If elapsed time is recorded in log is greater than max_elapsed use 0 for elapsed time.
283# Use 0 for no checking
284#
d6e703cc 285#max_elapsed 28800000
25697a35 286# 8 Hours
25697a35
GS
287
288# TAG: report_type type
289# What kind of reports to generate.
491b862f
GS
290# topusers - users, sites, times, bytes, connects, links to accessed sites, etc
291# topsites - site, connect and bytes report
292# sites_users - users and sites report
293# users_sites - accessed sites by the user report
294# date_time - bytes used per day and hour report
295# denied - denied sites with full URL report
296# auth_failures - autentication failures report
297# site_user_time_date - sites, dates, times and bytes report
298# downloads - downloads per user report
25697a35
GS
299#
300# Eg.: report_type topsites denied
301#
491b862f 302#report_type topusers topsites sites_users users_sites date_time denied auth_failures site_user_time_date downloads
25697a35
GS
303
304# TAG: usertab filename
305# You can change the "userid" or the "ip address" to be a real user name on the reports.
306# Table syntax:
307# userid name or ip address name
308# Eg:
309# SirIsaac Isaac Newton
310# vinci Leonardo da Vinci
311# 192.168.10.1 Karol Wojtyla
312#
313# Each line must be terminated with '\n'
e3af0ae9
PO
314# If usertab have value "ldap" (case ignoring), user names
315# will be taken from LDAP server. This method as approaches for reception
316# of usernames from Active Didectory
317#
25697a35 318#usertab none
e3af0ae9
PO
319
320# TAG: LDAPHost hostname
321# FQDN or IP address of host with LDAP service or AD DC
322# default is '127.0.0.1'
323#LDAPHost 127.0.0.1
324
325# TAG: LDAPPort port
326# LDAP service port number
327# default is '389'
328#LDAPPort 389
329
330# TAG: LDAPBindDN CN=username,OU=group,DC=mydomain,DC=com
331# DN of LDAP user, who is authorized to read user's names from LDAP base
332# default is empty line
333#LDAPBindDN cn=proxy,dc=mydomain,dc=local
334
335# TAG: LDAPBindPW secret
336# Password of DN, who is authorized to read user's names from LDAP base
337# default is empty line
338#LDAPBindPW secret
339
340# TAG: LDAPBaseSearch OU=users,DC=mydomain,DC=com
341# LDAP search base
342# default is empty line
343#LDAPBaseSearch ou=users,dc=mydomain,dc=local
344
345# TAG: LDAPFilterSearch uid=%s
346# User search filter by user's logins in LDAP
347# First founded record will be used
348# %s - will be changed to userlogins from access.log file
349# filter string can have some tags '%s'
350# default value is 'uid=%s'
351#LDAPFilterSearch uid=%s
352
353# TAG: LDAPTargetAttr attributename
354# Name of the attribute containing a name of the user
355# default value is 'cn'
356#LDAPTargetAttr cn
25697a35
GS
357
358# TAG: long_url yes|no
359# If yes, the full url is showed in report.
360# If no, only the site will be showed
361#
362# YES option generate very big sort files and reports.
363#
364#long_url no
365
366# TAG: date_time_by bytes|elap
367# Date/Time reports will use bytes or elapsed time?
368#
d6e703cc 369#date_time_by elap
25697a35
GS
370
371# TAG: charset name
372# ISO 8859 is a full series of 10 standardized multilingual single-byte coded (8bit)
373# graphic character sets for writing in alphabetic languages
374# You can use the following charsets:
375# Latin1 - West European
376# Latin2 - East European
377# Latin3 - South European
378# Latin4 - North European
379# Cyrillic
380# Arabic
381# Greek
382# Hebrew
383# Latin5 - Turkish
384# Latin6
385# Windows-1251
d6e703cc 386# Japan
25697a35 387# Koi8-r
d6e703cc 388# UTF-8
25697a35
GS
389#
390#charset Latin1
391
392# TAG: user_invalid_char "&/"
393# Records that contain invalid characters in userid will be ignored by Sarg.
394#
395#user_invalid_char "&/"
396
397# TAG: privacy yes|no
398# privacy_string "***.***.***.***"
399# privacy_string_color blue
400# In some countries the sysadm cannot see the visited sites by a restrictive law.
401# Using privacy yes the visited url will be changes by privacy_string and the link
402# will be removed from reports.
403#
404#privacy no
405#privacy_string "***.***.***.***"
406#privacy_string_color blue
407
408# TAG: include_users "user1:user2:...:usern"
409# Reports will be generated only for listed users.
410#
411#include_users none
412
413# TAG: exclude_string "string1:string2:...:stringn"
414# Records from access.log file that contain one of listed strings will be ignored.
415#
416#exclude_string none
417
418# TAG: show_successful_message yes|no
419# Shows "Successful report generated on dir" at end of process.
420#
421#show_successful_message yes
422
423# TAG: show_read_statistics yes|no
424# Shows some reading statistics.
425#
426#show_read_statistics yes
427
428# TAG: topuser_fields
429# Which fields must be in Topuser report.
430#
431#topuser_fields NUM DATE_TIME USERID CONNECT BYTES %BYTES IN-CACHE-OUT USED_TIME MILISEC %TIME TOTAL AVERAGE
432
433# TAG: user_report_fields
434# Which fields must be in User report.
435#
436#user_report_fields CONNECT BYTES %BYTES IN-CACHE-OUT USED_TIME MILISEC %TIME TOTAL AVERAGE
437
d6e703cc
FM
438# TAG: bytes_in_sites_users_report yes|no
439# Bytes field must be in Site & Users Report ?
440#
441#bytes_in_sites_users_report no
442
25697a35
GS
443# TAG: topuser_num n
444# How many users in topsites report. 0 = no limit
445#
446#topuser_num 0
447
448# TAG: site_user_time_date_type list|table
449# generate reports for site_user_time_date in list or table format
450#
451#site_user_time_date_type table
452
453# TAG: datafile file
454# Save the report results in a file to populate some database
455#
456#datafile none
25697a35
GS
457
458# TAG: datafile_delimiter ";"
459# ascii character to use as a field separator in datafile
460#
461#datafile_delimiter ";"
462
463# TAG: datafile_fields all
464# Which data fields must be in datafile
465# user;date;time;url;connect;bytes;in_cache;out_cache;elapsed
466#
467#datafile_fields user;date;time;url;connect;bytes;in_cache;out_cache;elapsed
468
491b862f
GS
469# TAG: datafile_url ip|name
470# Saves the URL as ip or name in datafile
471#
472#datafile ip
473
25697a35
GS
474# TAG: weekdays
475# The weekdays to take account ( Sunday->0, Saturday->6 )
476# Example:
477#weekdays 1-3,5
478# Default:
479#weekdays 0-6
480
481# TAG: hours
482# The hours to take account
483# Example:
484#hours 7-12,14,16,18-20
485# Default:
486#hours 0-23
487
488# TAG: dansguardian_conf file
489# DansGuardian.conf file path
490# Generate reports from DansGuardian logs.
491# Use 'none' to disable it.
492# dansguardian_conf /usr/dansguardian/dansguardian.conf
493#
494#dansguardian_conf none
495
491b862f 496# TAG: dansguardian_ignore_date on|off
d6e703cc
FM
497# 'on' must use the record even the date range is different from the used in squid access.log file.
498# 'off' must use the record only if the date range is in the irange used in squid access.log file.
491b862f
GS
499#
500#dansguardian_ignore_date off
501
25697a35
GS
502# TAG: squidguard_conf file
503# path to squidGuard.conf file
504# Generate reports from SquidGuard logs.
505# Use 'none' to disable.
491b862f 506# You can use sarg -L filename to use an alternate squidGuard log.
25697a35
GS
507# squidguard_conf /usr/local/squidGuard/squidGuard.conf
508#
509#squidguard_conf none
510
491b862f
GS
511# TAG: squidguard_ignore_date on|off
512# Use 'on' use the record even the date range is different from the used squid access.log file.
513# Use 'off' use the record only if the date range is in the used squid access.log file.
514#
515#squidguard_ignore_date off
516
25697a35
GS
517# TAG: squidguard_log_format
518# Format string SquidGuard logs.
519# REJIK #year#-#mon#-#day# #hour# #list#:#tmp# #ip# #user# #tmp#/#tmp#/#url#/#end#
520# SQUIDGUARD #year#-#mon#-#day# #hour# #tmp#/#list#/#tmp#/#tmp#/#url#/#tmp# #ip#/#tmp# #user# #end#
521#squidguard_log_format #year#-#mon#-#day# #hour# #tmp#/#list#/#tmp#/#tmp#/#url#/#tmp# #ip#/#tmp# #user# #end#
522
523# TAG: show_sarg_info yes|no
524# shows sarg information and site path on each report bottom
525#
526#show_sarg_info yes
527
528# TAG: show_sarg_logo yes|no
529# shows sarg logo
530#
531#show_sarg_logo yes
532
533# TAG: parsed_output_log directory
534# Saves the processed log in a sarg format after parsing the squid log file.
535# This is a way to dump all of the data structures out, after parsing from
536# the logs (presumably this data will be much smaller than the log files themselves),
537# and pull them back in for later processing and merging with data from previous logs.
538#
539#parsed_output_log none
540
491b862f 541# TAG: parsed_output_log_compress /bin/gzip|/usr/bin/bzip2|nocompress
ff8d5836
FM
542# Command to run to compress sarg parsed output log. It may contain
543# options (such as -f to overwrite existing target file). The name of
544# the file to compresse is provided at the end of this
545# command line. Don't forget to quote things appropriately.
25697a35
GS
546#
547#parsed_output_log_compress /bin/gzip
548
491b862f 549# TAG: displayed_values bytes|abbreviation
25697a35
GS
550# how the values will be displayed in reports.
551# eg. bytes - 209.526
552# abbreviation - 210K
553#
554#displayed_values bytes
555
556# Report limits
491b862f
GS
557# TAG: authfail_report_limit n
558# TAG: denied_report_limit n
559# TAG: siteusers_report_limit n
560# TAG: squidguard_report_limit n
561# TAG: user_report_limit n
562# TAG: dansguardian_report_limit n
563# TAG: download_report_limit n
25697a35
GS
564# report limits (lines).
565# '0' no limit
566#
567#authfail_report_limit 10
568#denied_report_limit 10
569#siteusers_report_limit 0
570#squidguard_report_limit 10
94ff9470
GS
571#dansguardian_report_limit 10
572#user_report_limit 10
573#user_report_limit 50
25697a35 574
491b862f 575# TAG: www_document_root dir
25697a35
GS
576# Where is your Web DocumentRoot
577# Sarg will create sarg-php directory with some PHP modules:
578# - sarg-squidguard-block.php - add urls from user reports to squidGuard DB
579#
580#www_document_root /var/www/html
581
491b862f 582# TAG: block_it module_url
25697a35
GS
583# This tag allow you to pass urls from user reports to a cgi or php module,
584# to be blocked by some Squid acl
585#
586# Eg.: block_it /sarg-php/sarg-block-it.php
587# sarg-block-it is a php that will append a url to a flat file.
588# You must change /var/www/html/sarg-php/sarg-block-it to point to your file
589# in $filename variable, and chown to a httpd owner.
590#
591# sarg will pass http://module_url?url=url
592#
593#block_it none
594
491b862f 595# TAG: external_css_file path
25697a35
GS
596# This tag allow internal sarg css override.
597# Sarg use theses style classes:
598# .body body class
599# .info sarg information class, align=center
600# .title title class, align=center
601# .header header class, align:left
602# .header2 header class, align:right
603# .header3 header class, align:right
604# .text text class, align:left
605# .data table text class, align:right
606# .data2 table text class, align:right, border colors
607# .link link class
608#
609# There is a sample in /usr/local/sarg/etc/css.tpl
610#
611#external_css_file none
612
491b862f 613# TAG: user_authentication yes|no
25697a35
GS
614# Allow user authentication in User Reports using .htaccess
615# Parameters:
616# AuthUserFile - where the user password file is
617# AuthName - authentication realm. Eg "Members Only"
618# AuthType - authenticaion type - basic
619# Require - authorized users to see the report.
620# %u - user report
621#
622# user_authentication no
623# AuthUserFile /usr/local/sarg/passwd
624# AuthName "SARG, Restricted Access"
625# AuthType Basic
626# Require user admin %u
627
491b862f 628# TAG: download_suffix "suffix,suffix,...,suffix"
25697a35
GS
629# file suffix to be considered as "download" in Download report.
630# Use 'none' to disable.
631#
94ff9470 632#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"
25697a35 633
491b862f 634# TAG: ulimit n
25697a35
GS
635# The maximum number of open file descriptors to avoid "Too many open files" error message.
636# You need to run sarg as root to use ulimit tag.
d6e703cc 637# If you run sarg with a low privilege user, set to 'none' to disable ulimit
25697a35
GS
638#
639#ulimit 20000
640
491b862f
GS
641# TAG: ntlm_user_format username|domainname+username
642# NTLM users format.
25697a35
GS
643#
644#ntlm_user_format domainname+username
491b862f
GS
645
646# TAG: realtime_refresh_time num sec
647# How many time to auto refresh the realtime report
648# 0 = disable
649#
650# realtime_refresh_time 3
651
652# TAG: realtime_access_log_lines num
653# How many last lines to get from access.log file
654#
655# realtime_access_log_lines 1000
656
657# TAG: realtime_types: GET,PUT,CONNECT,ICP_QUERY,POST
658# Which records must be in realtime report.
659#
660# realtime_types GET,PUT,CONNECT
661
662# TAG: realtime_unauthenticated_records: ignore|show
663# What to do with unauthenticated records in realtime report.
664#
d6e703cc 665# realtime_unauthenticated_records: show
491b862f
GS
666
667# TAG: byte_cost value no_cost_limit
668# Cost per byte.
669# Eg. byte_cost 0.01 100000000
670# per byte cost = 0.01
671# bytes with no cost = 100 Mb
672# 0 = disable
673#
674# byte_cost 0.01 50000000
d6e703cc
FM
675
676# TAG: squid24 on|off
677# Compatilibity with squid version <= 2.4 when using emulate_http_log on
678#
679# squid24 off