使用sarg生成日誌報告時出現以下報錯,沒法生成日誌報告
html
[root@squid ~]# sarg SARG: Records in file: 1113, reading: 100.00% SARG: No records found SARG: End
解決辦法:
更改sarg的主配置文件"/etc/sarg/sarg.conf",以下配置,便可生成
bash
[root@squid ~]# egrep -v '^#|^$' /etc/sarg/sarg.conf access_log /usr/local/squid/var/logs/access.log graphs no graph_days_bytes_bar_color orange title "Squid User Access Reports" temporary_dir /tmp output_dir /var/www/html/squid-reports user_ip yes records_without_userid ip exclude_codes date_time_by bytes charset UTF-8 squid24 on [root@squid opt]# sarg SARG: Records in file: 1131, reading: 100.00% SARG: Successful report generated on /var/www/html/squid-reports/2020Apr16-2020Apr16