The pfSense Store

Author Topic: i can't get SARG Report working  (Read 6479 times)

0 Members and 1 Guest are viewing this topic.

Offline aityahiaidir

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
    • View Profile
i can't get SARG Report working
« on: January 25, 2015, 08:09:15 am »
Hello all

i have Installed Squid3 with Squidguard 3 and it is impossible to get SARG report working, the realtime statut work correctly

i get the following error

Quote
Error: Could not find report index file.
Check and save sarg settings and try to force sarg schedule.

this is my system logs
Code: [Select]
php-fpm[43629]: /pkg_edit.php: Sarg: force refresh now with args, compress(on) and none action after sarg finish.
Code: [Select]
php-fpm[43629]: /pkg_edit.php: The command 'export LC_ALL=C && /usr/pbi/sarg-i386/bin/sarg ' returned exit code '1', the output was 'SARG: Records in file: 37469, reading: 0.00%^MSARG: Records in file: 5000, reading: 13.34%^MSARG: Records in file: 10000, reading: 26.69%^MSARG: Records in file: 15000, reading: 40.03%^MSARG: Records in file: 20000, reading: 53.38%^MSARG: Records in file: 25000, reading: 66.72%^MSARG: Records in file: 30000, reading: 80.07%^MSARG: Records in file: 35000, reading: 93.41%^MSARG: (repday) Cannot open log file /usr/local/sarg-reports/2015/01/24-25/9/d9.html SARG: Records in file: 37469, reading: 100.00%'
i have tried this solution without success
http://www.webkeydesign.com/416/fix-sarg-reports-in-pfsense/

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 12390
  • Karma: +486/-5
    • View Profile
Re: i can't get SARG Report working
« Reply #1 on: January 25, 2015, 07:24:30 pm »
Maybe just a symlinks from sarg-reports dir under  /usr/pbi.. to /usr/local/sarg-reports

Offline aityahiaidir

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
    • View Profile
Re: i can't get SARG Report working
« Reply #2 on: January 26, 2015, 02:56:22 am »
thanks for replay

my sarg.conf appear to be good ,i have this in report-dir

Code: [Select]
output_dir /usr/local/sarg-reports
and the path exist really

Offline aityahiaidir

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
    • View Profile
Re: i can't get SARG Report working
« Reply #3 on: January 26, 2015, 03:33:22 am »
i have find my report, they are generated in folder

Code: [Select]
/usr/pbi/sarg-i386/local/sarg-reports
where can i edit to put the correct  path, that my reports are accessible from "View Report" Tab
 
« Last Edit: January 26, 2015, 03:43:37 am by aityahiaidir »

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 12390
  • Karma: +486/-5
    • View Profile
Re: i can't get SARG Report working
« Reply #4 on: January 26, 2015, 06:22:05 am »
Remove /usr/local/sarg-reports  and
Symlink it to pbi dir

Code: [Select]

ln -s /usr/pbi/sarg-i386/local/sarg-reports /usr/local/sarg-reports

Offline aityahiaidir

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
    • View Profile
Re: i can't get SARG Report working
« Reply #5 on: January 27, 2015, 06:07:13 am »
Remove /usr/local/sarg-reports  and
Symlink it to pbi dir

Code: [Select]

ln -s /usr/pbi/sarg-i386/local/sarg-reports /usr/local/sarg-reports


i have tried this without success, what's do you mean by  "Remove /usr/local/sarg-reports"
 physically remove the folder ? or is something else
 

Offline doktornotor

  • Hero Member
  • *****
  • Posts: 8161
  • Karma: +842/-226
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: i can't get SARG Report working
« Reply #6 on: January 27, 2015, 06:11:17 am »
physically remove the folder ?

Yeah, bit of delicate fine tuning involving HDD platters and a chisel. (Make sure to stop the relevant services first, so that the bits stop moving on the platters, otherwise the job is kinda difficult to complete.)



For unexperienced/faint-hearted ones, perhaps

Code: [Select]
rm -rf /usr/local/sarg-reports
could be an acceptable workaround.

 ;D ;D ;D
« Last Edit: January 27, 2015, 06:14:20 am by doktornotor »
Do NOT PM for help!

Offline aityahiaidir

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
    • View Profile
Re: i can't get SARG Report working
« Reply #7 on: January 27, 2015, 06:21:20 am »
thank dok  ;D

but this is still not working, i have always this frightful message  >:(

Quote
Error: Could not find report index file.
Check and save sarg settings and try to force sarg schedule.

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 12390
  • Karma: +486/-5
    • View Profile
Re: i can't get SARG Report working
« Reply #8 on: January 27, 2015, 08:09:26 am »
Remove the folder and then create the Symlink  ;)

The results should be /usr/local/sarg-reports with your report files.

Offline aityahiaidir

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
    • View Profile
Re: i can't get SARG Report working
« Reply #9 on: January 27, 2015, 09:03:16 am »
Remove the folder and then create the Symlink  ;)

The results should be /usr/local/sarg-reports with your report files.

yes i do both tasks, bu it still not working, it would seem that the problem is elsewhere, it's still weird, it's a bug, it should work without resorting to all this complexity  :-\
   
 

Offline aityahiaidir

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
    • View Profile
Re: i can't get SARG Report working
« Reply #10 on: January 27, 2015, 09:51:44 am »
 :o it is a bug, when i select site_user and user_site from report type, its work
the bug is mentioned here

http://sourceforge.net/p/sarg/bugs/154/
« Last Edit: January 27, 2015, 11:23:18 am by aityahiaidir »

Offline KOM

  • Hero Member
  • *****
  • Posts: 5160
  • Karma: +640/-17
    • View Profile
Re: i can't get SARG Report working
« Reply #11 on: January 27, 2015, 10:00:37 am »
Quote
it should work without resorting to all this complexity

I agree, and these problems have been hanging around since before 2.1.x.  I've always had to fight with Lightsquid and Sarg.  Always.  They should just work or be removed from the repository.  I know the base system is where all the real action is, but people's opinion of the project can be heavily influenced by the experience they have with the packages.  Broken packages that remain broken after 1+ years just looks bad.

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 12390
  • Karma: +486/-5
    • View Profile
Re: i can't get SARG Report working
« Reply #12 on: January 27, 2015, 11:00:15 am »
They should just work or be removed from the repository.

Or instead of just watching, using and complaining, start to contributing.

Github is not that complex to use.

https://www.pfsense.org/get-involved/
« Last Edit: January 27, 2015, 11:05:24 am by marcelloc »

Offline aityahiaidir

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
    • View Profile
Re: i can't get SARG Report working
« Reply #13 on: January 27, 2015, 11:19:42 am »
I have very good knowledge in PHP, I'll try to help, but first I have to understand the operation mechanism of Sarg generating report  ;)

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 12390
  • Karma: +486/-5
    • View Profile
Re: i can't get SARG Report working
« Reply #14 on: January 27, 2015, 11:30:57 am »
I have very good knowledge in PHP, I'll try to help, but first I have to understand the operation mechanism of Sarg generating report  ;)

Great!  :)

The pbi is the biggest problem today. It "jais" the package under /usr/pbi dir but a lot of libs and package conf files still looks for it on /usr/local

All package gui files are on https://github.com/pfsense/pfsense-packages

Pfsense 2.3 will move from pbi to pkg ng, but until it happens, we have to deal with this...