Sarg: Blank Reports
-
Hello,
I have a full install of pfsense 2.1 with squid, squidfilter, and sarg installed. I am trying to get the sarg reports up and running and have an issue. The realtime reports are running just fine, but I can't see anything on the reports tab. It says "Error: Could not find report index file." On the general tab I have all the default options selected plus the "convert ip to dns" and the "overwrite report" selected. I have created a schedule to update the reports every 1h and tried the force update now button, but can't get a report to generate. I then tried to run sarg on the command line and got the output below. Any help is appreciated.Thanks.
[2.1-RELEASE][root@pfsense.mydomain.net]/usr/local/sarg-reports(68): sarg -z SARG: TAG: access_log /var/squid/logs/access.log SARG: TAG: graphs yes SARG: TAG: output_dir /usr/local/sarg-reports SARG: TAG: anonymous_output_files no SARG: TAG: resolve_ip yes SARG: TAG: user_ip no SARG: TAG: topuser_sort_field BYTES normal SARG: TAG: user_sort_field BYTES normal SARG: TAG: exclude_users /usr/pbi/sarg-i386/etc/sarg/exclude_users.conf SARG: TAG: exclude_hosts /usr/pbi/sarg-i386/etc/sarg/exclude_hosts.conf SARG: TAG: date_format u SARG: TAG: lastlog 31 SARG: TAG: remove_temp_files yes SARG: TAG: index yes SARG: TAG: index_tree file SARG: TAG: overwrite_report no SARG: TAG: use_comma yes SARG: TAG: exclude_codes /usr/pbi/sarg-i386/etc/sarg/exclude_codes SARG: TAG: max_elapsed 0 SARG: TAG: report_type topusers topsites sites_users users_sites site_user_time_date downloads SARG: TAG: usertab none SARG: TAG: long_url no SARG: TAG: date_time_by bytes SARG: TAG: charset UTF-8 SARG: TAG: privacy no SARG: TAG: bytes_in_sites_users_report no SARG: TAG: topuser_num 0 SARG: TAG: dansguardian_conf SARG: TAG: show_sarg_info no SARG: TAG: show_sarg_logo no SARG: TAG: displayed_values bytes SARG: TAG: authfail_report_limit 0 SARG: TAG: denied_report_limit 0 SARG: TAG: siteusers_report_limit 0 SARG: TAG: user_report_limit 0 SARG: TAG: www_document_root /usr/local/www SARG: TAG: ntlm_user_format user SARG: TAG: realtime_refresh_time 0 SARG: TAG: realtime_types GET,PUT,CONNECT SARG: TAG: realtime_unauthenticated_records show SARG: TAG: sorttable /sarg_sorttable.js SARG: TAG: hostalias /usr/pbi/sarg-i386/etc/sarg/hostalias SARG: Records in file: 11850, reading: 100.00% SARG: (info) date=28/01/2014 SARG: (info) period=2014 Jan 27-2014 Jan 28 SARG: (info) outdirname=/usr/local/sarg-reports/2014Jan27-2014Jan28 SARG: (info) Dansguardian report not produced because no dansguardian configuration file was provided SARG: (info) No redirector logs provided to produce that kind of report SARG: Cannot delete "/usr/local/sarg-reports/2014Jan27-2014Jan28/d192_168_1_103.html": No such file or directory [2.1-RELEASE][root@pfsense.mydomain.net]/usr/local/sarg-reports(69):
-
I'm searching the same answer.
My reports where working just fine till earlier today then stopped. I deleted all the reports and now "Error: Could not find report index file."
lightsquid is generating reports, sarg is kinda creating reports, ie, the reports exist in the /usr/local/sarg-reports folder BUT the index.html file isn't being created?
Any pointers onwhat to check?
-
Something screwy going on here. A fresh install of pfSense, squid and sarg still no Index although it appears reports are being generated and all options in the reporting settings are selected.
What appears to be happening although I dont know why is the config file isn't getting modified via the gui.
I locate the symlink for the sarg.conf.default file at /usr/local/etc/sarg and un commented the following lines and saved. I forced a re fresh and everything worked, clicking view report showed the report.
-
index yes
-
index_tree file
Yes I have since found the correct location (/usr/pbi/sarg-i386/etc/sarg) of the sarg.conf but since doing the above it all appears to work :o
So PJPorch give it a go an see if the result is the same for you!
-
-
Thanks for the tip, but unfortunately it did not work on my system. I think I am going to do a clean install and try again. This system has been running for a long time, upgraded, tweaked, etc and there might be something I did in the past that conflicts with this setup. I'll let you know how it goes after the install.
Regards
-
Will be interesting to see what happens when you reload. As per my last post this is a clean install and the problem is that sarg isn't creating the main index html file.
I have just checked and sarg isn't updating much to my disappointment.
Surely someone with more experience knows what the problem is?
-
From the command line does 'sarg -x' work?
Steve
-
Just finished a clean install and everything works great. I must have made some change or workaround in the past that caused an issue.
Thanks for the help/
Regards
-
Thanks Steve Evans,
That command line was helpfull, didn't fix the problem BUT it did show that sarg was failing with a "directory not empty" error. Deleted all contents from the sarg-reports folder and so far sarg had been working a treat.
Now; I have an appointment with a large wet fish and a work colleague (monty python reference) as they didn't do a fresh install of pfsense as requested (and stated above) just a factory reset :(.
Thanks everyone, appreciate the help
-
Hey there everyone. I am not sure if anyone still needs this answer. I was having this problem tonight and I could not find an answer online. I decided to drill down through the box and see what solutions I could come up with. Luckilly I was able to find out how to fix this. This Sarg issue is something that I have seen a lot of people report with new installations. While some of you have been able to just select certain logs and it loads I did not experience the same luck. Here is my quick fix:
- SSH into your box. Download and install putty enter your IP and port 22 and connect
2)Make sure that sarg is generating your reports by typing ls /usr/pbi/sarg-amd64/local/sarg-reports/ you should see stuff
3)Just to be safe, before we create the link run this command rm -rf /usr/local/sarg-reports/
4)Now we need to create a link that will redirect sarg to a different directory ln -s /usr/pbi/sarg-amd64/local/sarg-reports /usr/local/sarg-reports
Boom it should work
- SSH into your box. Download and install putty enter your IP and port 22 and connect
-
Yes, this is the known fix for this issue. I don't know how you didn't find it before as pretty much every person trying to use Sarg has had this problem. Ii've personally posted this fix about a dozen time over the past 6+ months. I think I might have read that they fixed it for 2.2.2 but I don't remember for sure.
-
Man I am not sure how I didn't catch it either. I searched all over these forums but I must not have been using the right keywords. Thanks for the heads up.