Is there any reporting tool for squid webproxy? (Like in pfsense's light squid package)
i figured it .... instructions bellow
pkg install sarg
edit sarg.conf file at this location
/usr/local/etc/sarg/sarg.conf
un-comment following lines for ur needs
access_log /var/log/squid/access.log (path to ur squid accress.log)
output_dir /var/www/html/squid-reports
date_format e (Date format in reports: e (European=dd/mm/yy), u (American=mm/dd/yy), w (Weekly=yy.ww))
overwrite_report (yes/no)
save the file
to generate the report run sarg -x on the command line
to view the report u need to install nginx on opnsense
go to services>nginx>configuration
in http(s) tab> location> add
add a description
URL Pattern = /test
Match Type = caseinsensitivemach
File System Root = /var/www/html/squid-reports
Index File = index.html
save
in http(s)tab>http server ( make sure to click advanced mode)
HTTP Listen Address = 8888 (port number-the port i use )
Default Server = tick
Server Name = fqdn of ur opnsense server or the ip
File System Root = /var/www/html/squid-reports
Locations = the name u add in the above step
save
Generel tab
Enable nginx = tick
how to access
http://ur opnsense ip or fqdn:8888(the port u give)
to run on a specific time ( i run on every day at 23.59)
edit
nano /etc/crontab
add this line to the borrom
59 23 * * * root sarg -x