Author Topic: SARG report issue  (Read 6967 times)

zolf

  • Zen Monk
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
SARG report issue
« on: January 22, 2011, 08:04:35 am »

Hi there,

i have setup SARG report on my zentyal firewall.but i get these IPs in the report. i dont understand why the report shows me public ip instead on my local machine ip which is in the range 192.168.0.100 to 200.please help.

cheers
Zolf

zolf

  • Zen Monk
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: SARG report issue
« Reply #1 on: January 23, 2011, 07:14:20 am »

please help

zolf

  • Zen Monk
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: SARG report issue
« Reply #2 on: January 30, 2011, 11:01:25 am »

anybody there to help me

adr14n

  • Zen Apprentice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
    • Arcom Mexico
Re: SARG report issue
« Reply #3 on: January 30, 2011, 08:06:44 pm »
Verify your /etc/sarg/sarg.conf file. If you're using dansgardian replace access log file from squid.log to dansgardian.log

I hope that is helpful

zolf

  • Zen Monk
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: SARG report issue
« Reply #4 on: January 31, 2011, 06:57:45 am »

thanks a lot

arun

  • Zen Monk
  • **
  • Posts: 86
  • Karma: +0/-0
  • no windows, no gates, all open
    • View Profile
Re: SARG report issue
« Reply #5 on: February 01, 2011, 12:37:56 pm »
I am long user of SARG, which is a very good for Squid reporting.

Recently I have installed "light squid", which is equally good and working well with Zentyal, you may also try ..

http://lightsquid.sourceforge.net/

Arun

ebox-steve

  • Zen Apprentice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: SARG report issue
« Reply #6 on: February 11, 2011, 01:46:35 pm »
Hi Arun and all,

Can you please teach me of how to step-by-step install the light squid add-ons? And maybe with sqstat if you familiar with :-)

Maybe one day zentyal will have its own function similar to those squid add-ons, I hope.

Sam Graf

  • Guest
Re: SARG report issue
« Reply #7 on: February 11, 2011, 02:26:27 pm »
I think extended reporting services in Zentyal will stay focused in the subscription cloud services. That's just my guess. It makes sense for an SaaS product like Zentyal to work that way, I think, to not only have a source of revenue for the company but also to offer consolidated, centralized management services via the cloud.

arun

  • Zen Monk
  • **
  • Posts: 86
  • Karma: +0/-0
  • no windows, no gates, all open
    • View Profile
Re: SARG report issue
« Reply #8 on: February 14, 2011, 08:18:32 am »
I do agree that the SaaS products should be there as a source of revenue for the company, but it should be in the side like backups and remote expert support etc...

Setting up lightsquid is very easy as follows (largely taken from its docs)

Step 1 : Required software - Perl, http server (Apache, lighthttpd, etc), Squid, Cron (most of which are already installed, so no need to do anything)

Step 2 : download lightsquid from http://lightsquid.sourceforge.net

Step 3 :Extract lightsquid.tgz into any folder  (handle the version number added to the file name)
            #cd /var/www/htdocs/
            #mkdir lightsquid
            #cd lightsquid
            #tar -xzf lightsquid.tgz

Step 4 : set 'executable' flag for scrip
            #chmod +x *.cgi
            #chmod +x *.pl

Step 5 : change owner (this step may not be required)
           #chown -R root:root *
           #(where apache = httpd user)

Step 6 : Configure your Apache server
           Edit Apache configuration file, at the end of the configuration file add the following code .cgi files must execute as CGI scrip
           /etc/apache2/apache2.conf
           <Directory "/var/www/lightsquid">
              Options +ExecCGI
            AddHandler cgi-script .cgi
           AllowOverride All
          </Directory>

Step 7 :  Edit lightsquid.cfg  (file is self explanatory )

Step 8 :#run check-setup.pl
              if all done try next step
              else check config file.

Step 9 :Try run lightparser.pl
             if everything is ok no messages will be produced

             parse old statistic (to generate report from old log)
             ./lightparser.pl access.log.1.{gz|bz2}
             ./lightparser.pl access.log.2.{gz|bz2}
             ./lightparser.pl access.log.3.{gz|bz2}

Step 10 : All done, now check the report

              Using your favorite browser enter http://<ip address where we live>/lightsquid/
Optional :

Step 11 : Edit following file for better reports

If you want GROUP reports - edit group.cfg
format:
     esl     01      SysAdmin
     karlos  01      SysAdmin
     Ivanov  02      Developer
     Ivanov2 02      Developer
     Petrov  03      Commerial

If you want use REALNAME - edit realname.cfg
format:
     arun   Arun Shrimali
     esl     Sergey Erokhin
     karlos  Super User1

Step 12 : Automate the process

Setup crontab to run lightparser once per hour, add the following line
#crontab -e
This example will execute parser every 20 minutes
*/20 * * * * /var/www/htdocs/lightsquid/lightparser.pl today

if you have small log and fast machine, you may run lightparser with smaller delay
warning not set interval less 10 min

That's all,
Best wishes
Arun
« Last Edit: August 03, 2011, 06:52:14 am by arun »

ebox-steve

  • Zen Apprentice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: SARG report issue
« Reply #9 on: February 18, 2011, 02:52:34 pm »
Hi Arun,

Thank your for providing the steps. As you have mentioned it earlier, that the steps you provided is largely taken from Lightsquid documentation, I have tried following the steps but I'm stuck until step 5.

Below is the list of the steps I have done and their notes:
Step 1: As for perl, squid, and cron, I think they're all there. While "http server", ie. Apache, I have to think and pause a bit here. Zentyal, mine is version 2.0-3, comes with a web-based administration interface, so there must be a web server already installed and setup. I tried to access http://localhost and it replied "It works".
Step 2: Download is fine, no problem.
Step 3: However, upon looking the folder "/var/www/htdocs/", it's just not there. So I tried to install the module "Web Server", as it was not initially installed, because I did not plan to use this machine as a web server, only gateway and infrastucture. After that I turned on the module, setup the configuration as follow:
Listening port = 80
Listening SSL port = disabled
Enable per user public_html = unchecked (unticked)
Virtual Host = Not setting up any
Then saved the changes.
I thought by now I should have the folder "/var/www/htdocs/", but it's still not there yet.
I browse trough the forum, and found a dicussion mentioning that the document root is "/var/www" without the "htdocs". So I thought maybe this is the one, and extracted the "lightsquid-1.8.tgz" there.
Step 4: Done. All are fine.
Step 5: Change owner to where apache = httpd user. I don't understand this. How do I identify any httpd user? What is the meaning of this?

Summary:
1. Now I have the "Web Server" module installed and configured. Hopefully I'm configuring it the right way. Sorry, actually I'm not configuring anything as I only using the default parameter value as mentioned on my note on step 3 above.
2. Folder "/var/www/htdocs/" is not available. Do I need to create this myself anyway?
3. The file "lightsquid-1.8.tgz" is currently extraced into the folder "/var/www", with executable flag for *.cgi and *.pl is set.

Please advise on how should I continue the step.

ebox-steve

  • Zen Apprentice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: SARG report issue
« Reply #10 on: February 21, 2011, 08:38:20 am »
Dear Arun,

It's working already. Thank you for your help.

B_Khuwera

  • Zen Monk
  • **
  • Posts: 51
  • Karma: +0/-1
    • View Profile
Re: SARG report issue
« Reply #11 on: October 15, 2011, 01:50:10 pm »
Hi Arun

I try to follow your procedure, but got stuck on Step 8 :#run check-setup.pl, it gave this warning
"sh check-setup.pl
Warning: unknown mime-type for "LightSquid Config Checker, (c) 2005-9 Sergey Erokhin GNU GPL\n\n" -- using "application/octet-stream"
Error: no such file "LightSquid Config Checker, (c) 2005-9 Sergey Erokhin GNU GPL\n\n"
check-setup.pl: 5: Syntax error: "(" unexpected

Please what should i do

Thanks

arun

  • Zen Monk
  • **
  • Posts: 86
  • Karma: +0/-0
  • no windows, no gates, all open
    • View Profile
Re: SARG report issue
« Reply #12 on: October 20, 2011, 06:43:26 am »
Dear Khuwere,

pl confirm that you have followed the step no. 3 perfectly ....
Its very simple to setup lightsquid

Arun

B_Khuwera

  • Zen Monk
  • **
  • Posts: 51
  • Karma: +0/-1
    • View Profile
Re: SARG report issue
« Reply #13 on: October 23, 2011, 06:40:44 pm »
Dear Arun ..

Thx for your reply, I try to set it up again tonight after reinstall the server, ..
somehow i change the log setting on squid and dansguardian .. and hit the update button for core 2.2.3 ... and both my sarg and calamaris are acting weird . crazy load on prosesor and huge log .. hahaha.. that's why i need some other reporting app like lightsquid... as my curiousity needs to know ..
i do not think its the core update .. just my stupidity .. haha

anyway, i set it up not using htdocs ..
i read ebox-steve post.. extract directly under /var/www/ ... cause document root is /var/www..
i tought i can use a symlink like i use with sarg and calamaris .. something like /var/www/calamaris and pointing to /home/it/calamaris
and i do not activate webserver module .. but i still can access sarg report and calamaris as cron job updates the result.

i report to you for the result .. after reinstalling the server tonight

Thanks n Regards

Khuwera

B_Khuwera

  • Zen Monk
  • **
  • Posts: 51
  • Karma: +0/-1
    • View Profile
Re: SARG report issue
« Reply #14 on: October 24, 2011, 12:38:42 am »
dear arun

i do step 3 exactly like you write it .. create /var/www/htdocs  .. because as ebox-steve said .. is not there...
i extract lightsquid-1.8.tgz under /var/www/htdocs/lightsquid .. change owner from 501:staff to root:root, change *.cgi and *.pl to +x
i type sudo sh check-setup.pl .. same thing ..
Warning: unknown mime-type for "LightSquid Config Checker, (c) 2005-9 Sergey Erokhin GNU GPL\n\n" -- using "application/octet-stream"
Error: no such file "LightSquid Config Checker, (c) 2005-9 Sergey Erokhin GNU GPL\n\n"
check-setup.pl: 5: Syntax error: "(" unexpected

Regards