Want package for squidanalyzer. INSTRUCTIONS AND FILES TO INSTALL



  • https://github.com/darold/squidanalyzer

    wonder if we can see this in a package?  I want to see stats from hits and misses and how much to each site and alll

    It shows all kinds of good information.. If you find useful I will help set it up manually on your box just https://db.tt/tr4phPVW Dropbox and join this to help me to be able to put a some stuff for you all in my box



  • No interest in this being a package?



  • I'm sure lots are interested but don't have the technical skill to make a package or contribute other than to test and suggest.  If you have the time, perhaps you could write up a quickie post on how to do it so that it can be referenced.  Personally something like this would be a 'nice to have' and not a 'need to have'.  I'd be happy to play around with it though.



  • Quickie post?  Not following what you mean.. I did manual install and got it running works good..



  • Quickie post?  Not following what you mean.

    As in a quick guide or list of steps to describe how to get it installed and working.



  • Will write one on my day off ok..




  • Ok Tools needed.

    WINSCP (for your computer) http://winscp.net/download/winscp556setup.exe (windows version)
    PUTTY (for your computer) http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe (windows version)
    CRON (in PFsense from Packages)

    Enabled shell connections in your advanced tab in Pfsense

    And these files I compiled. I did them because I don't want to break your firewall
    Sorry my data is in them not sure how to clean out yet.

    Download https://www.dropbox.com/s/86mgj9yfc7g1f8u/squidanalyzer.rar?dl=0
    this file will upload to  into /usr/local/www from your PC where you downloaded them using WINSCP

    In putty go to /usr/local/www and run tar -xzf squidanalyzer.rar

    This should make a folder in your directory called squidanalyzer.  From this you can go to https://yourfirewallip/squidanalyzer and see data that came from me but not your data yet.  So next steps will provide your data

    Download https://www.dropbox.com/s/bjgu1ijzsknlx6t/temp.rar?dl=0
    this file will upload to  into / directory (root) from your PC where you downloaded them using WINSCP

    In putty go to / and run tar -xzf temp.rar

    next install perl
    pkg install perl5.16-5.16.3_18 using putty.. If you never used pkg command it will say you have to download and install it.. answer yes and you then run the command again

    Now in your browser with the firewall.. go to services and CRON

    Add this to a cron job .

    cd /temp/squidanalyzer/ && perl squid-analyzer -r -c /etc/squidanalyzer/squidanalyzer.conf /var/squid/logs/access.log

    I put it for each hour ..

    If this helps you please click the thanks button.
    and https://db.tt/tr4phPVW sign up for dropbox so I have more room to put more helpful things




  • thanks Topper!  I didn't follow your write up, but was able to use the files that you compiled to get it working on my box…

    I dont see a FreeBSD port for it :-(  But it's basically a Perl script with a Perl module and a few config files...



  • Well hope it works good for you.  I know what you mean.. I will try clean up the install later.. I just finished making virtualbox work on my system so I can run snorby

    Give me thanks :)



  • And I had to compile it using Make to get those perl files and all that in the download you got. If not done that then you would not have all those files to be able to work.  You can try it right from Github in link in older posts and make your own if you want to try that also.

    Glad my work on figuring out how to get it working has given you some help and you have it going



  • There wasn't anything that needed be compiled. All the files are ready to use right from github. You just have to put them in the right place and have perl working. but thanks again for sharing



  • Well for some reason for me when I did it it did not work right out of box.  I had to run make on install file to get it to compile.. Maybe they updated it or something now.  That is cool that just need to move files in and that would work. Make easier to make a package for it.

    if someone would make a package



  • I keep telling myself one of these days i'll make a package… lol...  with this one, perl would have to be added so there would be a pbi instead of just dropping files into pfsense... pbi are like a jail setup for pfSense... keeps the binaries away from the core files.



  • So tell me how you like this software?



  • Dont know yet… need at least a week data to see if its worth it or not.  I like the fact I can have it break out my networks based on subnet... One issue which maybe a show stopped for me, it doesn't like IPv6 addresses... but still need to investigate if its my config or the software



  • Well they do good at updating it so maybe they will address that ipv6 issue sometime soon.. I will let you know if I see that
    I don't have ipv6 yet here to test with sorry.  I really not like Ipv6 wish it was not so long of length so I could remember them like ipv4



  • i hear ya on the address length but hostname/dns solves that problem



  • Anyone else try this yet?



  • me, but i do get error when uncompressing temp.rar

    Parsing filters is unsupported…



  • Sounds like the download was not complete on the file you got.  That would make it not unzip .. maybe try redownloading it



  • tar -xzf temp.rar
    temp/squidanalyzer/.git/objects/pack/pack-ef251a8f0489dcdb37651a0598fe5e498ffee007.idx: Parsing filters is unsupported.
    tar: Error exit delayed from previous errors.

    seems like it is not problem with the download archive…



  • Have teamviewer I will help with it. PM me with times you can let me help I work 3 till 11 every day est Florida time



  • Topper help me via teamviewer! Got it working!

    Thnks mate!



  • Now I really hope someone makes a package for it since I do not have time to learn the system yet



  • Anyone else try this or using it?



  • hi ,

    first thank you for this amazing reporting program

    i get a problem that the report is not updated the script is well executed but the report is not showing the daily update

    i try it and make it working i a different way

    i download your temp file only no  need for the www or perl

    inside the temp file  i execute the file

    sh install_all.sh

    it will create all the files and path needed

    install -m 755 squid-analyzer /usr/local/bin/
    install -m 644 resources/sorttable.js /var/www/squidanalyzer/
    install -m 644 resources/squidanalyzer.css /var/www/squidanalyzer/
    install -m 644 resources/flotr2.js /var/www/squidanalyzer/
    install -m 644 resources/images/logo-squidanalyzer.png /var/www/squidanalyzer/images/
    install -m 644 resources/images/cursor.png /var/www/squidanalyzer/images/
    install -m 644 resources/images/domain.png /var/www/squidanalyzer/images/
    install -m 644 resources/images/back-arrow.png /var/www/squidanalyzer/images/
    install -m 644 resources/images/info.png /var/www/squidanalyzer/images/
    install -m 644 resources/images/network.png /var/www/squidanalyzer/images/
    install -m 644 resources/images/user.png /var/www/squidanalyzer/images/
    install -m 644 lang/* /etc/squidanalyzer/lang/
    pod2text doc/SquidAnalyzer.pod README
    pod2man doc/SquidAnalyzer.pod squid-analyzer.3

    i make a symlink  /var/www/squidanalyzer/    to  /usr/local/www/squidanalyzer/

    ln /var/www/squidanalyzer/  /usr/local/www/squidanalyzer/

    i modify the file /etc/squidanalyzer/squidanalyzer.conf

    to meet the real path on pfsense

    change this area

    Output /usr/local/www/squidanalyzer
    WebUrl /squidanalyzer
    LogFile /var/squid/logs/access.log

    on the cron i need now only

    cd /temp/squidanalyzer/ && perl squid-analyzer

    and it create a daily report at 9:01 morning

    i hope that it help someone to get it working

    sacaman

    ![Screen Shot 2015-02-21 at 2.23.41 PM.png](/public/imported_attachments/1/Screen Shot 2015-02-21 at 2.23.41 PM.png)
    ![Screen Shot 2015-02-21 at 2.23.41 PM.png_thumb](/public/imported_attachments/1/Screen Shot 2015-02-21 at 2.23.41 PM.png_thumb)



  • Tq Topper727 and sacaman !



  • That is another way yes.  Please note the cron I setup and documented in the first install of this needs to be

    cd /temp/squidanalyzer/ && perl squid-analyzer -c /etc/squidanalyzer/squidanalyzer.conf /var/squid/logs/access.log

    I have done it with cd /temp/squidanalyzer/ && perl squid-analyzer also if your using my method.  good luck to all and message me if need some help



  • Wow, this looks really nice.  Any idea yet how to clear the previous data?



  • @zass:

    Tq Topper727 and sacaman !

    Hope everyone gets to try and if likes hits the thanks button help me here on this forum



  • I have found a way.  in the /usr/local/www/squidanalyzer folder you will see a 2015 folder if you delete that then run cd /temp/squidanalyzer/ && perl squid-analyzer -c -r /etc/squidanalyzer/squidanalyzer.conf /var/squid/logs/access.log this should erase all data and rebuild it



  • @sacaman:

    hi ,

    first thank you for this amazing reporting program

    i get a problem that the report is not updated the script is well executed but the report is not showing the daily update

    i try it and make it working i a different way

    i download your temp file only no  need for the www or perl

    inside the temp file  i execute the file

    sh install_all.sh

    it will create all the files and path needed

    install -m 755 squid-analyzer /usr/local/bin/
    install -m 644 resources/sorttable.js /var/www/squidanalyzer/
    install -m 644 resources/squidanalyzer.css /var/www/squidanalyzer/
    install -m 644 resources/flotr2.js /var/www/squidanalyzer/
    install -m 644 resources/images/logo-squidanalyzer.png /var/www/squidanalyzer/images/
    install -m 644 resources/images/cursor.png /var/www/squidanalyzer/images/
    install -m 644 resources/images/domain.png /var/www/squidanalyzer/images/
    install -m 644 resources/images/back-arrow.png /var/www/squidanalyzer/images/
    install -m 644 resources/images/info.png /var/www/squidanalyzer/images/
    install -m 644 resources/images/network.png /var/www/squidanalyzer/images/
    install -m 644 resources/images/user.png /var/www/squidanalyzer/images/
    install -m 644 lang/* /etc/squidanalyzer/lang/
    pod2text doc/SquidAnalyzer.pod README
    pod2man doc/SquidAnalyzer.pod squid-analyzer.3

    i make a symlink  /var/www/squidanalyzer/    to  /usr/local/www/squidanalyzer/

    ln /var/www/squidanalyzer/  /usr/local/www/squidanalyzer/

    i modify the file /etc/squidanalyzer/squidanalyzer.conf

    to meet the real path on pfsense

    change this area

    Output /usr/local/www/squidanalyzer
    WebUrl /squidanalyzer
    LogFile /var/squid/logs/access.log

    on the cron i need now only

    cd /temp/squidanalyzer/ && perl squid-analyzer

    and it create a daily report at 9:01 morning

    i hope that it help someone to get it working

    sacaman

    Really glad someone did some work to making it more like a package install and maybe someone will turn this into a package



  • Thanks Topper727 it's your discovery i try only to make it working on my system and i share my how to  ;)



  • When I run the Perl command, I get:

    FATAL: No configuration file!

    Perl works and I can get to Squidanalyzer's web page without any problem.



  • what method did you try ?

    if mine check this path if the file exist
    /etc/squidanalyzer/squidanalyzer.conf

    and modify this area :

    Output  /usr/local/www/squidanalyzer
    WebUrl  /squidanalyzer
    LogFile  /var/squid/logs/access.log

    then run the perl script



  • OK, I was doing this on a test server so I rolled it back to default to try again.  I got everything in place, but when I installed Perl I got this error:

    [1/1] Installing perl5.16-5.16.3_18…
    [1/1] Extracting perl5.16-5.16.3_18: 100%
    makewhatis: not found
    makewhatis: not found
    pkg: POST-INSTALL script failed

    This seems to be a known problem with FreeBSD 10 with some people saying that Perl is a mess in early 10 release builds, but has been subsequently fixed.

    Now perl -v doesn't do anything.  I don't know how I had it working before.

    Update:  It still works via /usr/local/bin/perl.  I still get the fatal error though.  The command:

    cd /temp/squidanalyzer/ && perl squid-analyzer -r -c /etc/squidanalyzer/squidanalyzer.conf /var/squid/logs/access.log
    

    can't possibly work since there is no /etc/squidanalyzer/squidanalyzer.conf file.  The folder /etc/squidanalyzer only gets created if you run the install.sh installer, and at no point does this tutorial mention that.



  • Dear KOM

    i get the same problem with other that i can't get the updated report chowing on the man page

    and i post my method to get it working on my system

    @sacaman:

    hi ,

    first thank you for this amazing reporting program

    i get a problem that the report is not updated the script is well executed but the report is not showing the daily update

    i try it and make it working i a different way

    i download your temp file only no  need for the www or perl

    inside the temp file  i execute the file

    sh install_all.sh

    it will create all the files and path needed

    install -m 755 squid-analyzer /usr/local/bin/
    install -m 644 resources/sorttable.js /var/www/squidanalyzer/
    install -m 644 resources/squidanalyzer.css /var/www/squidanalyzer/
    install -m 644 resources/flotr2.js /var/www/squidanalyzer/
    install -m 644 resources/images/logo-squidanalyzer.png /var/www/squidanalyzer/images/
    install -m 644 resources/images/cursor.png /var/www/squidanalyzer/images/
    install -m 644 resources/images/domain.png /var/www/squidanalyzer/images/
    install -m 644 resources/images/back-arrow.png /var/www/squidanalyzer/images/
    install -m 644 resources/images/info.png /var/www/squidanalyzer/images/
    install -m 644 resources/images/network.png /var/www/squidanalyzer/images/
    install -m 644 resources/images/user.png /var/www/squidanalyzer/images/
    install -m 644 lang/* /etc/squidanalyzer/lang/
    pod2text doc/SquidAnalyzer.pod README
    pod2man doc/SquidAnalyzer.pod squid-analyzer.3

    i make a symlink  /var/www/squidanalyzer/    to  /usr/local/www/squidanalyzer/

    ln /var/www/squidanalyzer/  /usr/local/www/squidanalyzer/

    i modify the file /etc/squidanalyzer/squidanalyzer.conf

    to meet the real path on pfsense

    change this area

    Output /usr/local/www/squidanalyzer
    WebUrl /squidanalyzer
    LogFile /var/squid/logs/access.log

    on the cron i need now only

    cd /temp/squidanalyzer/ && perl squid-analyzer

    and it create a daily report at 9:01 morning

    i hope that it help someone to get it working

    sacaman

    please try it as bellow and let me know if it work with you
    also you don't need to install perl if you follow my how to

    Br

    sacaman



  • perl: Command not found.

    which is to be expected since Perl isn't installed.  You must have installed it at some point in the past.



  • After manually installing perl and clearing up stupid typos that I insist on making, I got it working on my 2.2-x64 test box.  I'm trying to make it work on a 2.1.5-i386 box and it does everything except write the report into the output folder.  NO errors, but no output.  Hmmm.

    Does anyone know if this script will handle archived logs, like access.log.0, access.log.1 etc?



  • try only this command in terminal

    cd /temp/squidanalyzer/ && perl squid-analyzer


Log in to reply