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