Koozali.org: home of the SME Server

SARG Problems and possible solutions

Greg bellamy

SARG Problems and possible solutions
« on: April 16, 2002, 12:38:28 AM »
I have a Mitel 5.1.2 Server that is running SquidGuard 3.1 and Sarg from Filippo Carletti (latest version with manager panel add on). I had some problems getting this to work properly and wanted feedback along with telling others how I fixed them.

1st - I had an E-Smith 4.1.2 box with this setup but with the older RPMS. When I set it up I manually generated the 1st set of SARG files by ruuning the script sarg.daily. That worked fine. BUT!  When I did this with this version it put the information in /var/www/squid/ but it did not create the daily, weekly, or monthly folders. This resulted in there being an index.html file and one daily.html  file in the top level folder and when SARG did its thing it put the proper folders in there they could not be seen when you went to www.yourserver.com/squid because it woould open the index.html file and not show the folders. The fix is to go to /var/www/squid as root (Use midnight commander for this) and delete the index.html and the one daily file you created by doing the manual update. Now you can see the folders and browse the files that SARG has created at 3AM every day.

2nd - The Manager Panel link did not work. I looked at the @sarg file at /etc/e-smith/web/panels/manager/cgi-bin and it had a variable call that did not work for me on my system. It was my $url = "XXXX.XXXX.XXX/squid";
I changed it to my $url = "http://192.168.1.1/squid"; (or whatever you set your inside ip address to) and now it works. This by the way also is the case for the link in the SquidGuard 3.1 Manager Panel link that seemed broken on my box.

Now comments questions? Did I break anything else? Did this fix any problems anyone else had?
Later,
Greg Bellamy

Filippo Carletti

Re: SARG Problems and possible solutions
« Reply #1 on: April 16, 2002, 01:13:08 AM »
1. I'm not sure to understand the problem. I think that you upgraded e-smith-sarg
I tested upgrades, but I'm not sure about index.html. I think that it should move old daily reports into daily directory.

2. I feared that. I asked devinfo for an advice, but nobody answered.
The line reads:
    my $url = "/squid";
and it works on my box.
What does it show on your box ?

Thank you for the detailed report.
You shouldn't have broken anything.

Greg bellamy

Re: SARG Problems and possible solutions
« Reply #2 on: April 16, 2002, 02:11:09 AM »
Filippo,
No I  changed the hardware on my server and at that time I put 5.1.2 on it instead of the 4.1.2 that I was running on the old hardware. I then went to your site and downloaded the new RPM's and also the new SquidGuard 3.1 RPMs and installed them. Then I surfed to a few sites and ran the sarg.daily script to generate the first daily file. It was placed in the root directory with the index.html file but no directories (daily/weekly/monthly) were made yet. Later when SARG was run at 3AM it made the directories BUT since APACHE saw an index.html file in the root directory of the url www.yoursite.com/squid, it did not show the directories. Does this explain it?

2nd the my $url = "/squid"; was what was originally in the @squid file. It did not work. I then tried the following:
my $url = "192.168.1.1/squid";   and that did not work the I tried
my $url = "http://192.168.1.1/squid";  and that worked.
This was also the case with the same variable in the @squidguard file for the content filtering link in the Manager Panel.

Greg Bellamy




Filippo Carletti wrote:
>
> 1. I'm not sure to understand the problem. I think that you
> upgraded e-smith-sarg
> I tested upgrades, but I'm not sure about index.html. I think
> that it should move old daily reports into daily directory.
>
> 2. I feared that. I asked devinfo for an advice, but nobody
> answered.
> The line reads:
>     my $url = "/squid";
> and it works on my box.
> What does it show on your box ?
>
> Thank you for the detailed report.
> You shouldn't have broken anything.

Filippo Carletti

Re: SARG Problems and possible solutions
« Reply #3 on: April 16, 2002, 06:44:53 PM »
1. I can't understand how it could happen. Have a look at /usr/sbin/sarg.daily
2. I tested the redirection only with ie. What browser do you use ?
If your version works with ie I'll change the rpm.