Сен 082012
Что то стало скучно и решил попробовать парсинг лога squida.
До этого я использовал sams. Но хочется попробовать sarg.
Ставим.
# cd /usr/ports/www/sarg && make install clean
Собирал с такими опциями.
# make showconfig ===> The following configuration options are available for sarg-2.3.2_5: GD=on: Enable GD support NLS=on: Native Language Support PHP=on: Install PHP for reporting generating ===> Use 'make config' to modify these settings
Настроим sarg.
# cat /usr/local/etc/sarg/sarg.conf | egrep -v '^(#|$)' access_log /usr/local/squid/var/logs/access.log graphs yes graph_days_bytes_bar_color orange graph_font /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf title "Парсинг лога от кольмара" font_face Tahoma,Verdana,Arial header_color darkblue header_bgcolor blanchedalmond font_size 9px header_font_size 9px title_font_size 11px background_color white text_color #000000 text_bgcolor lavender title_color green logo_text_color #000000 image_size 80 45 temporary_dir /tmp output_dir /usr/local/www/apache22/data/squid/ resolve_ip yes topuser_sort_field BYTES reverse user_sort_field BYTES reverse date_format u remove_temp_files yes index yes overwrite_report yes topsites_num 100 index_sort_order D max_elapsed 28800000 report_type topusers topsites sites_users users_sites date_time denied auth_failures site_user_time_date downloads date_time_by bytes charset Koi8-r show_sarg_info no 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" # Указывем ip-адреса с которых ненужно собирать статистику. exclude_users /usr/local/etc/sarg/exclude_users #exclude_hоsts /usr/local/etc/sarg/exclude_hosts # Прописываем пары: ip - name_user, для отображения по имени. usertab /usr/local/etc/sarg/usertab.txt
В конфигурационный файл апача добавим алиас на диреткорию со статистикой.
# nano /usr/local/etc/apache22/httpd.conf Alias /sarg "/usr/local/www/data/squid/" <Directory "/usr/local/www/data/squid/"> Order deny,allow Allow from all </Directory>
такс, статья еще не доделана до конца, сегодня завтра допишу.
Здрасте.
Сейчас использую самс, есть ли смысл переходить на сарг?
Он тяжелый?