[ubuntu-ar] Sarg + Squid
Walter
info at infoquil.com.ar
Wed Feb 11 13:08:44 GMT 2009
Ariel Gustavo escribió:
> Buenas, tengo una consulta haber si alguien me puede dar una mano, tengo
> instalado Squid, e instale desde los repositorios de Ubunto Sarg
> (*Squid*Analysis Report Generator), para analizar los logs de Squid.
>
> Configure el archivo sarg.conf que se encuentra en /etc/squid/, de dicho
> archivo configure el idioma a español, la ubicación del access.log en
> /var/log/squid/access.log, directorio temporal /tmp, directorio donde se
>
> generaran los informes /var/www/html/squid-reports.
> Cuando lo quiero ejecutar y pongo sarg, me muestra el siguiente error:
>
> *SARG: No se encontraron registros**
> SARG: Fin
>
> Ya estuve bastante tiempo googleando y no encontré o no supe comprender a
>
> que se debe dicho error, así que si alguien me tira una soga estaré muy
> agradecido.
>
> De onda les digo que no me interesa implementar ninguna otra herramienta
> para analizar los logs de Squid, ya que estuve viendo varias y esta me
>
> parece por lejos la mejor, les aviso de onda para que no me recomienden
> otras herramientas.
>
> Uso Ubuntu Server 8.0.4
>
te envio mi sarg.conf (en este envio te borro algunas cosas que no estan
habilitadas
y ademas para que el correo no sea tan extenso)
uso Ubuntu Server 7.10
# sarg.conf
#
#
language Spanish
# TAG: access_log file
# Where is the access.log file
# sarg -l file
#
# TAG: title
# Especify the title for html page.
#
title "Squid User Access Reports"
# TAG: font_face
# Especify the font for html page.
#
font_face Tahoma,Verdana,Arial
# TAG: header_color
# Especify the header color
#
header_color darkblue
# TAG: header_bgcolor
# Especify the header bgcolor
#
header_bgcolor blanchedalmond
# TAG: font_size
# Especify the text font size
#
font_size 9px
# TAG: header_font_size
# Especify the header font size
#
#header_font_size 9px
# TAG: title_font_size
# Especify the title font size
#
#title_font_size 11px
# TAG: background_color
# TAG: background_color
# Html page background color
#
background_color white
# TAG: text_color
# Html page text color
#
text_color #000000
# TAG: text_bgcolor
# Html page text background color
#
text_bgcolor lavender
# TAG: title_color
# Html page title color
#
title_color green
# TAG: temporary_dir
# Temporary directory name for work files
# sarg -w dir
#
temporary_dir /tmp
# TAG: output_dir
# The reports will be saved in that directory
# sarg -o dir
#
#output_dir /var/www/html/squid-reports
# TAG: output_email
# Email address to send the reports. If you use this tag, no html
reports will be generated.
# sarg -e email
#
output_email "tu_direccion_de_correo_o_usuario (aca tengo puesto solo el
usuario, ejemplo:sistemas)" (sin comillas)
# TAG: resolve_ip yes/no
# Convert ip address to dns name
# sarg -n
resolve_ip
# TAG: user_ip yes/no
# Use Ip Address instead userid in reports.
# sarg -p
user_ip yes
# TAG: exclude_users file
# users within the file will be excluded from reports.
# you can use indexonly to have only index.html file.
#
exclude_users /etc/squid/sarg.users
# TAG: exclude_hosts file
# Hosts, domains or subnets will be excluded from reports.
#
# Eg.: 192.168.10.10 - exclude ip address only
# 192.168.10.0 - exclude full C class
# s1.acme.foo - exclude hostname only
# acme.foo - exclude full domain name
#
exclude_hosts /etc/squid/sarg.hosts
# TAG: useragent_log file
# useragent.log file patch to generate useragent report.
#
#useragent_log none
# TAG: date_format
# Date format in reports: e (European=dd/mm/yy), u
(American=mm/dd/yy), w (Weekly=yy.ww)
#
date_format u
# TAG: remove_temp_files yes
# Remove temporary files: geral, usuarios, top, periodo from root
report directory.
#
remove_temp_files yes
# TAG: index yes|no|only
# Generate the main index.html.
# only - generate only the main index.html
#
# TAG: index_tree date|file
# How to generate the index.
#
index_tree file
# TAG: exclude_codes file
# Ignore records with these codes. Eg.: NONE/400
#
exclude_codes /etc/squid/sarg.exclude_codes
# TAG: max_elapsed milliseconds
# If elapsed time is recorded in log is greater than max_elapsed
use 0 for elapsed time.
# Use 0 for no checking
#
#max_elapsed 0
# 8 Hours
max_elapsed 28800000
# TAG: usertab filename
# You can change the "userid" or the "ip address" to be a real user
name on the reports.
# Table syntax:
# userid name or ip address name
# Eg:
# SirIsaac Isaac Newton
# vinci Leonardo da Vinci
# 192.168.10.1 Karol Wojtyla
#
# Each line must be terminated with '\n'
#
usertab /etc/squid/sarg.usertab
# TAG: long_url yes|no
# If yes, the full url is showed in report.
# If no, only the site will be showed
#
# YES option generate very big sort files and reports.
#
long_url yes
# TAG: date_time_by bytes|elap
# Date/Time reports will use bytes or elapsed time?
#
date_time_by elap
# TAG: charset name
# ISO 8859 is a full series of 10 standardized multilingual
single-byte coded (8bit)
# graphic character sets for writing in alphabetic languages
# You can use the following charsets:
# Latin1 - West European
# Latin2 - East European
# Latin3 - South European
# Latin4 - North European
# Cyrillic
# Arabic
# Greek
# Hebrew
# Latin5 - Turkish
# Latin6
# Windows-1251
# Koi8-r
#
charset Latin1
# TAG: user_invalid_char "&/"
# Records that contain invalid characters in userid will be ignored
by Sarg.
#
#user_invalid_char "&/"
# TAG: privacy yes|no
# privacy_string "***.***.***.***"
# privacy_string_color blue
# In some countries the sysadm cannot see the visited sites by a
restrictive law.
# Using privacy yes the visited url will be changes by
privacy_string and the link
# will be removed from reports.
#
#privacy no
privacy no
#privacy_string "***.***.***.***"
#privacy_string_color blue
# TAG: show_successful_message yes|no
# Shows "Successful report generated on dir" at end of process.
#
show_successful_message no
# TAG: show_read_statistics yes|no
# Shows some reading statistics.
#
show_read_statistics no
# TAG: topuser_fields
# Which fields must be in Topuser report.
#
topuser_fields NUM DATE_TIME USERID CONNECT BYTES %BYTES IN-CACHE-OUT
USED_TIME MILISEC %TIME TOTAL AVERAGE
# TAG: user_report_fields
# Which fields must be in User report.
#
user_report_fields CONNECT BYTES %BYTES IN-CACHE-OUT USED_TIME MILISEC
%TIME TOTAL AVERAGE
# TAG: site_user_time_date_type list|table
# generate reports for site_user_time_date in list or table format
#
site_user_time_date_type table
# TAG: datafile_url ip|name
# Saves the URL as ip or name in datafile
#
#datafile ip
# TAG: block_it module_url
# This tag allow you to pass urls from user reports to a cgi or php
module,
# to be blocked by some Squid acl
#
# Eg.: block_it /sarg-php/sarg-block-it.php
# sarg-block-it is a php that will append a url to a flat file.
# You must change /var/www/html/sarg-php/sarg-block-it to point to
your file
# in $filename variable, and chown to a httpd owner.
#
# sarg will pass http://module_url?url=url
#
#block_it none
# TAG: download_suffix "suffix,suffix,...,suffix"
# file suffix to be considered as "download" in Download report.
# Use 'none' to disable.
#
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"
# TAG: ulimit n
# The maximum number of open file descriptors to avoid "Too many open
files" error message.
# You need to run sarg as root to use ulimit tag.
#
#ulimit 20000
# TAG: byte_cost value no_cost_limit
# Cost per byte.
# Eg. byte_cost 0.01 100000000
# per byte cost = 0.01
# bytes with no cost = 100 Mb
# 0 = disable
#
# byte_cost 0.01 50000000
mail_utility mailx
access_log /var/log/squid/access.log
--
Walter
www.infoquil.com.ar
More information about the Ubuntu-ar
mailing list