Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Sarg package for pfsense

    Scheduled Pinned Locked Moved pfSense Packages
    467 Posts 99 Posters 507.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Z
      zoro_2009
      last edited by

      I confirm the problem !  :(

      1 Reply Last reply Reply Quote 0
      • KOMK
        KOM
        last edited by

        Try this from the shell:

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

        Use ln -s /usr/pbi/sarg-amd64/local/sarg-reports /usr/local/sarg-reports if you have 64-bit build.

        1 Reply Last reply Reply Quote 0
        • T
          Taras_
          last edited by

          @KOM:

          Try this from the shell:

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

          Thanks! Fixes problem :)

          1 Reply Last reply Reply Quote 0
          • E
            erasmus
            last edited by

            My Hardware: APU1C4

            only this solved the Problem:

            in console

            rm -rf /usr/local/sarg-reports
            ln -s /usr/pbi/sarg-amd64/local/sarg-reports /usr/local/sarg-reports

            1 Reply Last reply Reply Quote 0
            • B
              Brutos
              last edited by

              Was having a similar issue glad i found this post fixed the issue for me thanks

              1 Reply Last reply Reply Quote 0
              • A
                ak
                last edited by

                I ran the above commands to delete the directory and create the symlink to /usr/pbi/sarg-amd64/local/sarg-reports. I can see sarg generated logs under here. However on the 'View Report' tab I still get

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

                This is on a fresh pfSense install running 2.2-RELEASE with Sarg 2.3.9 pkg v.0.6.4, Squid3 4.3.10_2 pkg 0.2.6

                1 Reply Last reply Reply Quote 0
                • KOMK
                  KOM
                  last edited by

                  Check your other options.  Sarg seems to be finicky and will not work right with the wrong combination of report options.  Do you have Generate main index.html and Generate the index tree by file set to Yes, for instance?

                  1 Reply Last reply Reply Quote 0
                  • A
                    ak
                    last edited by

                    Thanks KOM - checked the two options you suggested about index.html and they were selected. I then selected all and thought to try that and reduce it to my original set.

                    After selecting every option, I ran```
                    sarg -x

                    
                    Thanks for the help.
                    1 Reply Last reply Reply Quote 0
                    • A
                      aityahiaidir
                      last edited by

                      for who have this error even after creating symlink /usr/local/sarg-reports to /usr/pbi/sarg-i386/local/sarg-reports /usr/local/sarg-reports or /usr/pbi/sarg-amd64/local/sarg-reports /usr/local/sarg-reports depending on the version you have installed

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

                      you certainly chosen SquidGuard as proxy server in Sarg general report setting (with Squid it's work fine).

                      after some debug,i noticed that Sarg is looking for SquidGuard config file  in the below location

                      /usr/pbi/squidguard-i386/etc/squidguard/squidGuard.conf
                      

                      but the conf file is located in an other folder

                       /usr/pbi/squidguard-i386/local/etc/squid/squidGuard.conf
                      

                      for this Srag break generating index report, even if you try to change the folder in the Sarg configuration file, it will always set to the wrong one after each saving Sarg configuration.

                      i wil tryed to fixe that with symlink but it's dont work,

                      1 Reply Last reply Reply Quote 0
                      • R
                        robatwork
                        last edited by

                        I too am having problems with sarg reports, but having looked at this thread I can't see an identical issue - realtime report is OK but normal reports aren't generated, in syslog I get

                        php-fpm[68742]: /pkg_edit.php: The command 'export LC_ALL=C && /usr/pbi/sarg-amd64/bin/sarg -d `date +%d/%m/%Y' returned exit code '2', the output was ''

                        In SSH I get

                        export: Command not found.

                        Sarg is 2.3.9 v0.6.4 and pfsense is 2.2.1 (amd64) ie. both the latest.

                        Any ideas?

                        thanks

                        1 Reply Last reply Reply Quote 0
                        • R
                          robatwork
                          last edited by

                          Forget that. It was the wrong close quote mark ie should have been:
                          date +%d/%m/%Y

                          more dumb questions coming soon.

                          Oh and add me to the "me too" people who had to do the link command ln -s to get this to work

                          1 Reply Last reply Reply Quote 0
                          • J
                            jabo53
                            last edited by

                            I can't seem to get the report feature to work.  Error:
                            Error: Could not find report index file.
                            Check and save sarg settings and try to force sarg schedule.
                            have forced updates etc… but no help.  I know it can generate them in the cli by running sarg -x and then if I go into the tmp directory I can see them and read them, however the index file is not being created.
                            I believe the conf file is correct but

                            TAG: index yes|no|only

                            #      Generate the main index.html.
                            #      only - generate only the main index.html

                            index yes

                            TAG: index_tree date|file

                            #      How to generate the index.

                            index_tree file

                            TAG:  output_dir

                            #      The reports will be saved in that directory
                            #      sarg -o dir

                            output_dir /usr/local/sarg-reports

                            any useful info would be appreciated
                            System
                            2.2.1-RELEASE (amd64)
                            built on Fri Mar 13 08:16:49 CDT 2015
                            FreeBSD 10.1-RELEASE-p6
                            Squid3 -3.4.10_2 pkg 0.2.7
                            Sarg 2.3.9 pkg v.0.6.4

                            1 Reply Last reply Reply Quote 0
                            • KOMK
                              KOM
                              last edited by

                              Did you try the symlink fix shown abpve?

                              1 Reply Last reply Reply Quote 0
                              • J
                                jabo53
                                last edited by

                                I have the same problem
                                "Error: Could not find report index file.
                                Check and save sarg settings and try to force sarg schedule."

                                I can view the realtime with no problem though.

                                It appears the reports are being generated but to:
                                "/usr/pbi/sarg-amd64/local/sarg-reports"

                                I checked the conf file and the report path is: /usr/local/sarg-reports
                                Tried changing it to:"/usr/pbi/sarg-amd64/local/sarg-reports" but no difference.
                                Tried creating symb link from "/usr/pbi/sarg-amd64/local/sarg-reports" to /usr/local/sarg-reports with the direction from another post in this thread and yes the reports were there but still the the same error message.

                                I can see I am not the only one with this issue but I have not seen a real solution yet.  Is this a bug with squid3 dev or a problem with sarg?

                                Do I need to manually put in some type of integration parameters as squidguard puts in for itself?

                                Or if someone has the info on how to configure sarg to send the reports via email that would be good also.

                                Jabo

                                1 Reply Last reply Reply Quote 0
                                • J
                                  jabo53
                                  last edited by

                                  @KOM:

                                  Did you try the symlink fix shown abpve?

                                  Yes I did, see here
                                  https://forum.pfsense.org/index.php?topic=47765.msg511144#msg511144

                                  Thanks
                                  Jabo

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    sujyo1
                                    last edited by

                                    Here is my Sarg in action!! In system log no sarg error and date is correct when i force update sarg reports but In Sarg View reports and Sarg real time are showing old reports!!

                                    2.1.5-RELEASE (i386)
                                    built on Mon Aug 25 07:44:26 EDT 2014
                                    FreeBSD 8.3-RELEASE-p16

                                    Intel(R) Atom(TM) CPU N280 @ 1.66GHz
                                    2 CPUs: 1 package(s) x 1 core(s) x 2 HTT threads

                                    $ squid -v
                                    Squid Cache: Version 2.7.STABLE9

                                    Sarg 2.3.6_2 pkg v.0.6.3

                                    SYSTEM LOG:

                                    Apr 18 02:00:00 php: sarg.php: Sarg: force refresh now with -d date +%d/%m/%Y-date +%d/%m/%Y args, compress(on) and none action after sarg finish.

                                    Apr 18 01:17:47 php: /pkg_edit.php: Sarg: force refresh now with -d date +%d/%m/%Y-date +%d/%m/%Y args, compress(on) and none action after sarg finish.
                                    Apr 18 01:17:47 check_reload_status: Syncing firewall
                                    Apr 18 01:17:40 php: /pkg_edit.php: Sarg: force refresh now with -d date +%d/%m/%Y-date +%d/%m/%Y args, compress(on) and none action after sarg finish.

                                    SARG VIEW REPORT:

                                    Squid User Access Report
                                    FILE/PERIOD CREATION DATE USERS BYTES AVERAGE
                                    2015Mar23-2015Mar23 Mon Mar 23 23:00:24 2015 3 58,608 19,536
                                    2015Mar22-2015Mar22 Sun Mar 22 23:00:27 2015 18 4,130,379,537 229,465,529
                                    2015Mar21-2015Mar21 Sat Mar 21 23:00:33 2015 37 3,529,371,665 95,388,423
                                    2015Mar20-2015Mar20 Fri Mar 20 23:00:28 2015 32 3,079,436,066 96,232,377
                                    2015Mar19-2015Mar19 Thu Mar 19 23:00:29 2015 19 4,513,906,771 237,574,040
                                    2015Mar18-2015Mar18 Wed Mar 18 23:00:26 2015 17 2,775,934,852 163,290,285
                                    2015Mar17-2015Mar17 Tue Mar 17 23:00:24 2015 19 1,386,602,417 72,979,074
                                    2015Mar16-2015Mar16 Mon Mar 16 23:00:23 2015 15 1,118,870,024 74,591,33

                                    SARG REALTIME:

                                    DATE/TIME IP/NAME USERID TYPE ACCESSED SITE
                                    2015-03-23 00:13 10.10.10.171 - GET captive.apple.com
                                    2015-03-23 00:09 10.10.10.33 - GET i.ytimg.com
                                    2015-03-22 23:59 10.10.10.171 - GET captive.apple.com
                                    2015-03-22 23:59 10.10.10.33 - GET safesecuredownload.com
                                    2015-03-22 23:59 10.10.10.33 - GET gomotrak.com

                                    1 Reply Last reply Reply Quote 0
                                    • F
                                      firetxelo
                                      last edited by

                                      @KOM:

                                      Try this from the shell:

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

                                      Use ln -s /usr/pbi/sarg-amd64/local/sarg-reports /usr/local/sarg-reports if you have 64-bit build.

                                      This fix the problem… try it

                                      Att,

                                      Marcelo Moraes

                                      http://mmoraessolucoes.com.br

                                      1 Reply Last reply Reply Quote 0
                                      • V
                                        VictorCheng
                                        last edited by

                                        @marcelloc:

                                        @namek:

                                        Hello, Is it possible to change the unit from bytes to something higher? like KB or MB?

                                        Sure. :)

                                        Just select Show values in reports using abbreviation on sarg general tab.

                                        Hello, I no longer see the Show values options in Sarg (pfSense 2.2.2, Sarg 0.6.4). I see nothing like that on the General tab.
                                        On the Users tab I can select User Sort Field: BYTES(default), SITE normal, CONNECT and TIME.
                                        I want to display Sarg reports in Megabytes instead of Bytes.
                                        Help anyone?

                                        1 Reply Last reply Reply Quote 0
                                        • R
                                          Requiring
                                          last edited by

                                          @firetxelo:

                                          @KOM:

                                          Try this from the shell:

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

                                          Use ln -s /usr/pbi/sarg-amd64/local/sarg-reports /usr/local/sarg-reports if you have 64-bit build.

                                          This fix the problem… try it

                                          thank's its work on my pfsense…. ;) ;) ;)

                                          1 Reply Last reply Reply Quote 0
                                          • R
                                            robatwork
                                            last edited by

                                            Hello all,

                                            My sarg installation is in a bit of a mess. Rather than trying to fix what I think are multiple issues, I want to completely remove sarg including any logs and settings, and install it again from scratch.  I have tried an uninstall but this doesn't get rid of everything.  Any simple pointers on how to nuke sarg totally?
                                            thanks!

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.