Sarg (Squid Analysis Report Generator – Генератор Аналитических Отчётов Squid)
доступен на нескольких языках, а на русском аж в трёх кодировках: koi-8, UTF-8, windows-1251
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
0. apt-get install sarg 1.nano /etc/sarg/sarg.conf access_log /var/log/squid/access.log graphs yes graph_days_bytes_bar_color orange title "Squid User Access Reports" font_face Tahoma,Verdana,Arial header_color darkblue header_bgcolor blanchedalmond font_size 9px background_color white text_color #000000 text_bgcolor lavender title_color green temporary_dir /tmp output_dir /var/www/squid-reports resolve_ip user_ip no topuser_sort_field BYTES reverse user_sort_field BYTES reverse exclude_users /etc/sarg/exclude_users exclude_hosts /etc/sarg/exclude_hosts date_format u lastlog 0 remove_temp_files yes index yes index_tree file overwrite_report yes records_without_userid ip use_comma yes mail_utility mailx topsites_num 100 topsites_sort_order CONNECT D index_sort_order D exclude_codes /etc/sarg/exclude_codes max_elapsed 28800000 report_type topusers topsites sites_users users_sites date_time denied auth_failures site_user_time_date downloads usertab /etc/sarg/usertab long_url no date_time_by bytes charset UTF-8 show_read_statistics no topuser_fields NUM DATE_TIME USERID CONNECT BYTES %BYTES IN-CACHE-OUT USED_TIME MILISEC %TIME TOTAL AVERAGE user_report_fields CONNECT BYTES %BYTES IN-CACHE-OUT USED_TIME MILISEC %TIME TOTAL AVERAGE topuser_num 0 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" 2. crontab -e */5 * * * * /usr/bin/sarg каждые 5 минут запускать sarg 3. http://you_ip/squid-reports |