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

    Want package for squidanalyzer. INSTRUCTIONS AND FILES TO INSTALL

    Scheduled Pinned Locked Moved Cache/Proxy
    94 Posts 18 Posters 29.5k 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.
    • P
      Presbuteros
      last edited by

      Ok. If the reboot was no joy, I suggest an uninstall then reinstall? I just did it on my installation and all went well.

      1. I uninstalled Squidanalyzer from my install with

      pkg remove squidanalyzer
      

      It notified me that,

      Checking integrity... done (0 conflicting)
      Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):
      Installed packages to be REMOVED:
              squidanalyzer-6.5
      Number of packages to be removed: 1
      Proceed with deinstalling packages? [y/N]: y
      [1/1] Deinstalling squidanalyzer-6.5...
      You may need to manually remove /usr/local/etc/squidreport/squidanalyzer.conf if it is no longer needed.
      [1/1] Deleting files for squidanalyzer-6.5: 100%
      

      2. I used WinSCP to log into my PFSense install and navigated to /usr/local/etc/squidreport/
      My "squidanalyzer.conf" file was still there. I deleted it.

      3. I reinstalled Squidanalyzer with```
      pkg add http://pkg.freebsd.org/freebsd:10:x86:64/latest/All/squidanalyzer-6.5.txz

      WinSCP was still open to /usr/local/etc/squidreport/ so I clicked the refresh button which revealed the newly installed files.
      
      **4.** I opened the sqidanalyzer.conf file and made my desired changes.
      
      **5.** I ran```
      cd /usr/local/bin/ && perl squid-analyzer
      

      6. I navigated to x.x.x.x/squidreport and all was well.

      Good luck.

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

        Well, Presbuteros I did everything you suggested:
        Rebooted, uninstalled, reinstalled, ran commands etc

        After all that I still have to use the "x.x.x.x/squidreport/2017" to see it. It seems to be working like this though, so I'll just stick with it as is.

        Last question, do I need to set up cron to run the "cd /usr/local/bin/ && perl squid-analyzer" command once per day?


        2.6.0-RELEASE

        1 Reply Last reply Reply Quote 0
        • P
          Presbuteros
          last edited by

          Glad it "works" for you.

          @AR15USR:

          Last question, do I need to set up cron to run the "cd /usr/local/bin/ && perl squid-analyzer" command once per day?

          Yes, you can set the cron job to any frequency you want, even multiple times a day depending on your needs. If you check Squidanalyzer more than once a day then build that into your cron job setting.

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

            Great, and thanks for all your help. Much appreciated…


            2.6.0-RELEASE

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

              Had a few issues getting this installed, but got it all figured out after a little bit of tinkering on pfSense 2.3.3 and SquidAnalyzer 6.5

              My biggest problem was cron not running the task for some reason. 
              I adjusted the cron command to:

              /usr/local/bin/perl /usr/local/bin/squid-analyzer
              

              The second issue I ran into was this error being thrown at me when I visited specific pages in the report.

              Mar 16 15:02:07 pfSense pfsense.rrm.local nginx: 2017/03/16 15:02:07 [error] 30129#100219: *234503 open() "/usr/local/www/squidreport/images/up-arrow.png" failed (2: No such file or directory), client: 192.168.16.101, server: , request: "GET /squidreport/images/up-arrow.png HTTP/1.1", host: "192.168.16.1", referrer: "http://192.168.16.1/squidreport/squidanalyzer.css"

              My install of SquidAnalyzer didn't come with up-arrow.png for some reason. 
              To fix this you just need to put a 16x16 .PNG picture inside of /usr/local/www/squidreport/images folder
              You can remotely connect using WinSCP and manually put your own file or you can just copy an icon already in that directory.
              Run the following command from shell to copy the back arrow image and use it as the up arrow image.

              cd /usr/local/www/squidreport/images
              cp back-arrow.png up-arrow.png
              

              If you want Squid Analyzer to include SquidGuard blocked / denied pages you can modify the log files it pulls in the config file at /usr/local/etc/squidreports/squidanalyzer.conf
              Using a comma to separate the list.

              # Set the path to the Squid, squidGuard and/or ufdbGuard log files
              LogFile	/var/squid/logs/access.log,/var/squidGuard/log/block.log
              

              The full SquidAnalyzer readme that can help you fully customize the reports to your needs.  https://github.com/darold/squidanalyzer/blob/master/README

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

                @felda:

                My biggest problem was cron not running the task for some reason. 
                I adjusted the cron command to:

                /usr/local/bin/perl /usr/local/bin/squid-analyzer
                

                I had the same issue and just to add the problem is the shebang in the first line of /usr/local/bin/squid-analyzer file:

                #!/usr/bin/env perl
                

                This tries to read environment variable for perl and depending from where you execute it they might exist or not. If executing via cron the environment variables for perl don't exist hence the script fails.

                To fix you can change the first line of /usr/local/bin/squid-analyzer to:

                #!/usr/local/bin/perl
                

                This makes the script less pflexible but will ensure you can just execute "/usr/local/bin/squid-analyzer" instead of doing the "cd /usr/local/bin/ && perl squid-analyzer" or "/usr/local/bin/perl /usr/local/bin/squid-analyzer"

                1 Reply Last reply Reply Quote 0
                • marcellocM
                  marcelloc
                  last edited by

                  The package options looks similar to sarg package.

                  Do you think it's a good idea to create a gui for it on it on Unofficial pfSense package repo?

                  https://github.com/marcelloc/Unofficial-pfSense-packages

                  Treinamentos de Elite: http://sys-squad.com

                  Help a community developer! ;D

                  K 1 Reply Last reply Reply Quote 0
                  • marcellocM
                    marcelloc
                    last edited by

                    I've included the squidanalyzer package on my Unofficial repo. It includes all steps I found on english and portuguese forum and added a php file to protect report files using pfSense authetication.

                    more screenshots form the project on github

                    http://freecode.com/projects/squidanalyzer/screenshots

                    report_permissions.PNG
                    report_permissions.PNG_thumb
                    squidanalyzer.png
                    squidanalyzer.png_thumb
                    squidanalyzer_php.PNG
                    squidanalyzer_php.PNG_thumb

                    Treinamentos de Elite: http://sys-squad.com

                    Help a community developer! ;D

                    1 Reply Last reply Reply Quote 0
                    • C
                      Cino
                      last edited by

                      Thank you Marcelloc!!

                      Works pretty good. I do have a thought, would it be better to use location: '/var/squidreport' instead of '/usr/local/squidreport' ?

                      1 Reply Last reply Reply Quote 0
                      • marcellocM
                        marcelloc
                        last edited by

                        @Cino:

                        Thank you Marcelloc!!

                        Works pretty good. I do have a thought, would it be better to use location: '/var/squidreport' instead of '/usr/local/squidreport' ?

                        I'll see. Is there any pfSense version that cleans /var on boot?

                        Treinamentos de Elite: http://sys-squad.com

                        Help a community developer! ;D

                        1 Reply Last reply Reply Quote 0
                        • C
                          Cino
                          last edited by

                          idk the answer to that.. but lightsquid reports are stored at '/var/lightsquid'  (define('LS_REPORTPATH', '/var/lightsquid/report');)

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

                            @marcelloc:

                            I've included the squidanalyzer package on my Unofficial repo. It includes all steps I found on english and portuguese forum and added a php file to protect report files using pfSense authetication.

                            more screenshots form the project on github

                            http://freecode.com/projects/squidanalyzer/screenshots

                            I see the screen shots with some beautiful graphs, but I do not see the list of users nor the denied sites tables, nor the accessed sites tables.

                            And if used with e2guardian squid format logs the reason for blocking table.

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

                              In trying to setup this in my new pfsense 2.4 .. will work on 2.4 but not on 2.3.4  please note.  Easy setup..

                              https://forum.pfsense.org/index.php?topic=127299.0

                              Dell 2950 g3 server
                              Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
                              Current: 2000 MHz, Max: 2667 MHz
                              8 CPUs: 2 package(s) x 4 core(s)
                              8152 MiB and 600meg 10k drive
                              Pfsense 2.4 .. Hoping to get the phpvirtualbox going again.

                              1 Reply Last reply Reply Quote 0
                              • K
                                kasalencar @marcelloc
                                last edited by

                                @marcelloc Instalei o squidanalyzer após ativar o seu repositórios não oficial. Após instalação ainda apresenta as seguintes recomendações:

                                1. Modify your httpd.conf to allow access to HTML output like follow:
                                  Alias /squidreport /usr/local/www/squidreport
                                  <Directory /usr/local/www/squidreport>
                                  Options -Indexes FollowSymLinks MultiViews
                                  AllowOverride None
                                  Order deny,allow
                                  Deny from all
                                  Allow from 127.0.0.1
                                  </Directory>

                                2. If necessary, give additional host access to SquidAnalyzer in httpd.conf.
                                  Restart and ensure that httpd is running.

                                3. Browse to http://my.host.dom/squidreport/ to ensure that things are working
                                  properly.

                                4. Setup a cronjob to run squid-analyzer daily:

                                  SquidAnalyzer log reporting daily

                                  0 2 * * * /usr/local/bin/squid-analyzer > /dev/null 2>&1

                                or run it manually.
                                For more information, see /usr/local/share/doc/squidanalyzer/README file.

                                Cleaning up cache... done.

                                Poderia ajduar?

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