]> git.ipfire.org Git - thirdparty/sarg.git/blame - sarg.conf
Don't duplicate sarg-php upon installation
[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#
182# Eg.: 192.168.10.10 - exclude ip address only
183# 192.168.10.0 - exclude full C class
184# s1.acme.foo - exclude hostname only
185# acme.foo - exclude full domain name
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'
314#
315#usertab none
316
317# TAG: long_url yes|no
318# If yes, the full url is showed in report.
319# If no, only the site will be showed
320#
321# YES option generate very big sort files and reports.
322#
323#long_url no
324
325# TAG: date_time_by bytes|elap
326# Date/Time reports will use bytes or elapsed time?
327#
d6e703cc 328#date_time_by elap
25697a35
GS
329
330# TAG: charset name
331# ISO 8859 is a full series of 10 standardized multilingual single-byte coded (8bit)
332# graphic character sets for writing in alphabetic languages
333# You can use the following charsets:
334# Latin1 - West European
335# Latin2 - East European
336# Latin3 - South European
337# Latin4 - North European
338# Cyrillic
339# Arabic
340# Greek
341# Hebrew
342# Latin5 - Turkish
343# Latin6
344# Windows-1251
d6e703cc 345# Japan
25697a35 346# Koi8-r
d6e703cc 347# UTF-8
25697a35
GS
348#
349#charset Latin1
350
351# TAG: user_invalid_char "&/"
352# Records that contain invalid characters in userid will be ignored by Sarg.
353#
354#user_invalid_char "&/"
355
356# TAG: privacy yes|no
357# privacy_string "***.***.***.***"
358# privacy_string_color blue
359# In some countries the sysadm cannot see the visited sites by a restrictive law.
360# Using privacy yes the visited url will be changes by privacy_string and the link
361# will be removed from reports.
362#
363#privacy no
364#privacy_string "***.***.***.***"
365#privacy_string_color blue
366
367# TAG: include_users "user1:user2:...:usern"
368# Reports will be generated only for listed users.
369#
370#include_users none
371
372# TAG: exclude_string "string1:string2:...:stringn"
373# Records from access.log file that contain one of listed strings will be ignored.
374#
375#exclude_string none
376
377# TAG: show_successful_message yes|no
378# Shows "Successful report generated on dir" at end of process.
379#
380#show_successful_message yes
381
382# TAG: show_read_statistics yes|no
383# Shows some reading statistics.
384#
385#show_read_statistics yes
386
387# TAG: topuser_fields
388# Which fields must be in Topuser report.
389#
390#topuser_fields NUM DATE_TIME USERID CONNECT BYTES %BYTES IN-CACHE-OUT USED_TIME MILISEC %TIME TOTAL AVERAGE
391
392# TAG: user_report_fields
393# Which fields must be in User report.
394#
395#user_report_fields CONNECT BYTES %BYTES IN-CACHE-OUT USED_TIME MILISEC %TIME TOTAL AVERAGE
396
d6e703cc
FM
397# TAG: bytes_in_sites_users_report yes|no
398# Bytes field must be in Site & Users Report ?
399#
400#bytes_in_sites_users_report no
401
25697a35
GS
402# TAG: topuser_num n
403# How many users in topsites report. 0 = no limit
404#
405#topuser_num 0
406
407# TAG: site_user_time_date_type list|table
408# generate reports for site_user_time_date in list or table format
409#
410#site_user_time_date_type table
411
412# TAG: datafile file
413# Save the report results in a file to populate some database
414#
415#datafile none
25697a35
GS
416
417# TAG: datafile_delimiter ";"
418# ascii character to use as a field separator in datafile
419#
420#datafile_delimiter ";"
421
422# TAG: datafile_fields all
423# Which data fields must be in datafile
424# user;date;time;url;connect;bytes;in_cache;out_cache;elapsed
425#
426#datafile_fields user;date;time;url;connect;bytes;in_cache;out_cache;elapsed
427
491b862f
GS
428# TAG: datafile_url ip|name
429# Saves the URL as ip or name in datafile
430#
431#datafile ip
432
25697a35
GS
433# TAG: weekdays
434# The weekdays to take account ( Sunday->0, Saturday->6 )
435# Example:
436#weekdays 1-3,5
437# Default:
438#weekdays 0-6
439
440# TAG: hours
441# The hours to take account
442# Example:
443#hours 7-12,14,16,18-20
444# Default:
445#hours 0-23
446
447# TAG: dansguardian_conf file
448# DansGuardian.conf file path
449# Generate reports from DansGuardian logs.
450# Use 'none' to disable it.
451# dansguardian_conf /usr/dansguardian/dansguardian.conf
452#
453#dansguardian_conf none
454
491b862f 455# TAG: dansguardian_ignore_date on|off
d6e703cc
FM
456# 'on' must use the record even the date range is different from the used in squid access.log file.
457# 'off' must use the record only if the date range is in the irange used in squid access.log file.
491b862f
GS
458#
459#dansguardian_ignore_date off
460
25697a35
GS
461# TAG: squidguard_conf file
462# path to squidGuard.conf file
463# Generate reports from SquidGuard logs.
464# Use 'none' to disable.
491b862f 465# You can use sarg -L filename to use an alternate squidGuard log.
25697a35
GS
466# squidguard_conf /usr/local/squidGuard/squidGuard.conf
467#
468#squidguard_conf none
469
491b862f
GS
470# TAG: squidguard_ignore_date on|off
471# Use 'on' use the record even the date range is different from the used squid access.log file.
472# Use 'off' use the record only if the date range is in the used squid access.log file.
473#
474#squidguard_ignore_date off
475
25697a35
GS
476# TAG: squidguard_log_format
477# Format string SquidGuard logs.
478# REJIK #year#-#mon#-#day# #hour# #list#:#tmp# #ip# #user# #tmp#/#tmp#/#url#/#end#
479# SQUIDGUARD #year#-#mon#-#day# #hour# #tmp#/#list#/#tmp#/#tmp#/#url#/#tmp# #ip#/#tmp# #user# #end#
480#squidguard_log_format #year#-#mon#-#day# #hour# #tmp#/#list#/#tmp#/#tmp#/#url#/#tmp# #ip#/#tmp# #user# #end#
481
482# TAG: show_sarg_info yes|no
483# shows sarg information and site path on each report bottom
484#
485#show_sarg_info yes
486
487# TAG: show_sarg_logo yes|no
488# shows sarg logo
489#
490#show_sarg_logo yes
491
492# TAG: parsed_output_log directory
493# Saves the processed log in a sarg format after parsing the squid log file.
494# This is a way to dump all of the data structures out, after parsing from
495# the logs (presumably this data will be much smaller than the log files themselves),
496# and pull them back in for later processing and merging with data from previous logs.
497#
498#parsed_output_log none
499
491b862f 500# TAG: parsed_output_log_compress /bin/gzip|/usr/bin/bzip2|nocompress
25697a35
GS
501# sarg logs compress util
502#
503#parsed_output_log_compress /bin/gzip
504
491b862f 505# TAG: displayed_values bytes|abbreviation
25697a35
GS
506# how the values will be displayed in reports.
507# eg. bytes - 209.526
508# abbreviation - 210K
509#
510#displayed_values bytes
511
512# Report limits
491b862f
GS
513# TAG: authfail_report_limit n
514# TAG: denied_report_limit n
515# TAG: siteusers_report_limit n
516# TAG: squidguard_report_limit n
517# TAG: user_report_limit n
518# TAG: dansguardian_report_limit n
519# TAG: download_report_limit n
25697a35
GS
520# report limits (lines).
521# '0' no limit
522#
523#authfail_report_limit 10
524#denied_report_limit 10
525#siteusers_report_limit 0
526#squidguard_report_limit 10
94ff9470
GS
527#dansguardian_report_limit 10
528#user_report_limit 10
529#user_report_limit 50
25697a35 530
491b862f 531# TAG: www_document_root dir
25697a35
GS
532# Where is your Web DocumentRoot
533# Sarg will create sarg-php directory with some PHP modules:
534# - sarg-squidguard-block.php - add urls from user reports to squidGuard DB
535#
536#www_document_root /var/www/html
537
491b862f 538# TAG: block_it module_url
25697a35
GS
539# This tag allow you to pass urls from user reports to a cgi or php module,
540# to be blocked by some Squid acl
541#
542# Eg.: block_it /sarg-php/sarg-block-it.php
543# sarg-block-it is a php that will append a url to a flat file.
544# You must change /var/www/html/sarg-php/sarg-block-it to point to your file
545# in $filename variable, and chown to a httpd owner.
546#
547# sarg will pass http://module_url?url=url
548#
549#block_it none
550
491b862f 551# TAG: external_css_file path
25697a35
GS
552# This tag allow internal sarg css override.
553# Sarg use theses style classes:
554# .body body class
555# .info sarg information class, align=center
556# .title title class, align=center
557# .header header class, align:left
558# .header2 header class, align:right
559# .header3 header class, align:right
560# .text text class, align:left
561# .data table text class, align:right
562# .data2 table text class, align:right, border colors
563# .link link class
564#
565# There is a sample in /usr/local/sarg/etc/css.tpl
566#
567#external_css_file none
568
491b862f 569# TAG: user_authentication yes|no
25697a35
GS
570# Allow user authentication in User Reports using .htaccess
571# Parameters:
572# AuthUserFile - where the user password file is
573# AuthName - authentication realm. Eg "Members Only"
574# AuthType - authenticaion type - basic
575# Require - authorized users to see the report.
576# %u - user report
577#
578# user_authentication no
579# AuthUserFile /usr/local/sarg/passwd
580# AuthName "SARG, Restricted Access"
581# AuthType Basic
582# Require user admin %u
583
491b862f 584# TAG: download_suffix "suffix,suffix,...,suffix"
25697a35
GS
585# file suffix to be considered as "download" in Download report.
586# Use 'none' to disable.
587#
94ff9470 588#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 589
491b862f 590# TAG: ulimit n
25697a35
GS
591# The maximum number of open file descriptors to avoid "Too many open files" error message.
592# You need to run sarg as root to use ulimit tag.
d6e703cc 593# If you run sarg with a low privilege user, set to 'none' to disable ulimit
25697a35
GS
594#
595#ulimit 20000
596
491b862f
GS
597# TAG: ntlm_user_format username|domainname+username
598# NTLM users format.
25697a35
GS
599#
600#ntlm_user_format domainname+username
491b862f
GS
601
602# TAG: realtime_refresh_time num sec
603# How many time to auto refresh the realtime report
604# 0 = disable
605#
606# realtime_refresh_time 3
607
608# TAG: realtime_access_log_lines num
609# How many last lines to get from access.log file
610#
611# realtime_access_log_lines 1000
612
613# TAG: realtime_types: GET,PUT,CONNECT,ICP_QUERY,POST
614# Which records must be in realtime report.
615#
616# realtime_types GET,PUT,CONNECT
617
618# TAG: realtime_unauthenticated_records: ignore|show
619# What to do with unauthenticated records in realtime report.
620#
d6e703cc 621# realtime_unauthenticated_records: show
491b862f
GS
622
623# TAG: byte_cost value no_cost_limit
624# Cost per byte.
625# Eg. byte_cost 0.01 100000000
626# per byte cost = 0.01
627# bytes with no cost = 100 Mb
628# 0 = disable
629#
630# byte_cost 0.01 50000000
d6e703cc
FM
631
632# TAG: squid24 on|off
633# Compatilibity with squid version <= 2.4 when using emulate_http_log on
634#
635# squid24 off