Koozali.org: home of the SME Server

[Announce] Sarg on sme server 7

Offline MasterSleepy

  • *
  • 386
  • +0/-0
    • http://www.vanhees.cc
[Announce] Sarg on sme server 7
« on: April 27, 2006, 08:32:18 AM »
Hello everyone,

I've finished my last howto, it concerne the installation of sarg on sme server 7.
You can find it http://www.vanhees.cc/index.php?module=ContentExpress&func=display&ceid=41.

Regards.

Offline ajkeane

  • ****
  • 187
  • +0/-0
    • http://keane.co.nz
[Announce] Sarg on sme server 7
« Reply #1 on: April 27, 2006, 11:34:13 AM »
Thanks for this great to see.

I am however having issues.

When I reboot my server I am getting the following error on screen and am unable to use the local web server.

Syntax Error on line 1690 of /etc/httpd/cpnf/httpd.conf:
Invalid Command'_______',Perhaps mis-spelled or defined by module not included in the server configuration

I can confirm that line 1690 is the start of the entry for sarg and that if I remove the custom template and reconfigure/reboot the server the error disapears.

I have double checked the template fragment and cannot see anything.

Any ideas.

Thanks

Tony
...

Offline ajkeane

  • ****
  • 187
  • +0/-0
    • http://keane.co.nz
[Announce] Sarg on sme server 7
« Reply #2 on: April 27, 2006, 12:02:59 PM »
Managed to sort this.

This is my copy of the 90e-smithAccess20sarg custom template

{
my $externalSSLAccess = '';
my $validFrom = db_get_prop($confref, "httpd-admin", "ValidFrom") || 'none';

$validFrom =~ s/,/ /g;
$validFrom =~ s:/255.255.255.255::g;

unless ($validFrom eq 'none')
{
$externalSSLAccess = $validFrom;
}

$OUT .= <<HERE;

#-----------------------------------------------------------------------------
# SARG generated squid access log reports web repository
#
#-----------------------------------------------------------------------------

Alias /squid /var/www/sarg
<Directory /var/www/sarg>
Options +Includes
AllowOverride None
order deny,allow
deny from all
allow from $localAccess $externalSSLAccess
AuthName "e-smith manager"
AuthType Basic
AuthExternal pwauth
require user admin
</Directory>

#-----------------------------------------------------------------------------
# End of SARG generated squid access log reports web repository
#
#-----------------------------------------------------------------------------
HERE
}

The problem was the # at the start and end of the sarg generated squid access log reports.

Thanks again

Tony
...

Offline byte

  • *
  • 2,183
  • +2/-0
[Announce] Sarg on sme server 7
« Reply #3 on: April 27, 2006, 12:10:58 PM »
I can confirm with you Tony that exactly what I had to do too is add the # to the...

#-----------------------------------------------------------------------------
# SARG generated squid access log reports web repository
#
#-----------------------------------------------------------------------------


Start & end.

Mastersleepy many thanks for this great contrib that I've used for many years!! have a  :pint:  on me
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline MasterSleepy

  • *
  • 386
  • +0/-0
    • http://www.vanhees.cc
[Announce] Sarg on sme server 7
« Reply #4 on: April 27, 2006, 01:02:50 PM »
Great thanks.
I've made a too fast copy-paste.

I've correct the howto now.

 :pint: byte
 :pint: ajkeane

Offline briank

  • ***
  • 146
  • +0/-0
[Announce] Sarg on sme server 7
« Reply #5 on: April 27, 2006, 08:23:05 PM »
Just installed and works fine thankyou.
Small details you might like to change in the howto -
when you try and edit /etc/e-smith/web/functions/sarg the file did not initially exist, need to pico /etc/e-smith/web/functions/sarg
At the end

/sbin/e-smith/signal-event post-upgrade
/sbin/e-smith/signal-event reboot

to get rid of Unknown in the server-manager.
Many thanks for updating this contrib. Not having it has been one reason I have not gone to sme 7 :)
Regards
Brian Kirk

Offline MasterSleepy

  • *
  • 386
  • +0/-0
    • http://www.vanhees.cc
[Announce] Sarg on sme server 7
« Reply #6 on: April 28, 2006, 11:08:05 AM »
Howto has been modified.

 :pint: briank

Offline byte

  • *
  • 2,183
  • +2/-0
[Announce] Sarg on sme server 7
« Reply #7 on: April 28, 2006, 11:49:22 AM »
Just re-reading this and this line...

 #
-----------------------------------------------------------------------------
# End of SARG generated squid access log reports web repository
#
-----------------------------------------------------------------------------

needs to be...


#-----------------------------------------------------------------------------
# End of SARG generated squid access log reports web repository
#
#-----------------------------------------------------------------------------

Otherwise httpd will complain about incorrect usage.

Mastersleepy will you be doing this an RPM for this? if not I may look into this, the only thing with that code is it's not done in FormMagick, but still it works and that's great...Thanks again
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline MasterSleepy

  • *
  • 386
  • +0/-0
    • http://www.vanhees.cc
[Announce] Sarg on sme server 7
« Reply #8 on: April 28, 2006, 04:24:35 PM »
Now it's corrected.

Effectively, rpm should be a good idea.
I'll take a look at that this week-end.

Thanks for feedback.

Offline MasterSleepy

  • *
  • 386
  • +0/-0
    • http://www.vanhees.cc
[UPDATED] Sarg Howto and contrib
« Reply #9 on: May 02, 2006, 07:59:21 AM »
Hello all,

Following the byte's idea, thanks to him  :pint: , I build rpm for sarg installation.
Howto have been modified.
http://www.vanhees.cc/index.php?module=ContentExpress&func=display&ceid=41

Regards.

Offline ajkeane

  • ****
  • 187
  • +0/-0
    • http://keane.co.nz
[Announce] Sarg on sme server 7
« Reply #10 on: May 07, 2006, 06:04:49 AM »
I have noticed that every saturday night I get no records for the day and that the weekly stats fail as well stating no records found.

Is anyone else having this issue?

Tony
...

Offline GMa

  • 6
  • +0/-0
[Announce] Sarg on sme server 7
« Reply #11 on: May 07, 2006, 11:40:49 AM »
Quote from: "ajkeane"
I have noticed that every saturday night I get no records for the day and that the weekly stats fail as well stating no records found.

Is anyone else having this issue?

Tony


Hi,

I've installed Sarg a few days ago, and I've just noticed the same problem:
- no Saturday report
- no Weekly report

this email was sent to the admin:
/etc/cron.weekly/sarg:

SARG: No records found
SARG: End

Offline ajkeane

  • ****
  • 187
  • +0/-0
    • http://keane.co.nz
[Announce] Sarg on sme server 7
« Reply #12 on: May 07, 2006, 08:49:25 PM »
I have also installed dansguardian as per the how to here: http://mirror.contribs.org/smeserver/contribs/rmitchell/smeserver/howto/dansguardian%20instal%20&%20configure%20HOWTO%20for%20sme%20server.htm

I have configured the proxy to use port 8080 with the following code:

db configuration setprop squid TransparentPort 8080

signal-event post-upgrade

signal-event reboot

However now all internet usage is listed under localhost. Is there a way to correct this?

Thanks.

Tony
...

Offline MasterSleepy

  • *
  • 386
  • +0/-0
    • http://www.vanhees.cc
[Announce] Sarg on sme server 7
« Reply #13 on: May 08, 2006, 08:06:53 AM »
Hello all,

for weekly report, i found the solution this week-end, I apply the solution for monthly report but I forget to a apply it to daily  :-x
So I will correct it this evening.
There is a new version
http://www.vanhees.cc/index.php?name=CmodsDownload&file=index&req=viewsdownload&orderby=dateD
but not the final.

Regards.

Offline ajkeane

  • ****
  • 187
  • +0/-0
    • http://keane.co.nz
[Announce] Sarg on sme server 7
« Reply #14 on: May 08, 2006, 08:55:15 AM »
Thanks for the update.

However when I try o install I get the following error:

rpm -Uvh smeserver-sarg-1.0-2.noarch.rpm
Preparing...                ########################################### [100%]
        file /etc/cron.monthly/sarg from install of smeserver-sarg-1.0-2 conflicts with file from package sarg-1.4.1-5.2.el4.rf
        file /etc/cron.weekly/sarg from install of smeserver-sarg-1.0-2 conflicts with file from package sarg-1.4.1-5.2.el4.rf

Thanks

Tony
...

Offline MasterSleepy

  • *
  • 386
  • +0/-0
    • http://www.vanhees.cc
[Announce] Sarg on sme server 7
« Reply #15 on: May 08, 2006, 10:03:07 AM »
HHhmmm that seems normal because I change that file.
Normally you can force installation but I prefer to build a new rpm this week.
I think that I'll integrate both rpm in one.

Regards

Offline ajkeane

  • ****
  • 187
  • +0/-0
    • http://keane.co.nz
[Announce] Sarg on sme server 7
« Reply #16 on: May 08, 2006, 10:41:44 AM »
Thanks for that. I must admit that I decided against a force but agree that that should work.

I look forward to your new rpm and thank you for all the great work.

Tony
...

Offline GMa

  • 6
  • +0/-0
[Announce] Sarg on sme server 7
« Reply #17 on: May 08, 2006, 01:59:31 PM »
Thanks as well,

No hurry for me, I will wait the final RPM

Offline MasterSleepy

  • *
  • 386
  • +0/-0
    • http://www.vanhees.cc
[Announce] Sarg on sme server 7
« Reply #18 on: May 12, 2006, 09:27:16 AM »
Hy all,

Here the "final" rpm.
This rpm contains automatic installation of sarg in only one rpm

Here is the rpm
http://www.vanhees.cc/index.php?name=CmodsDownload&file=index&req=viewdownloaddetails&lid=289

Here is the source rpm
http://www.vanhees.cc/index.php?name=CmodsDownload&file=index&req=viewdownloaddetails&lid=290

Please remove every other rpm concerning sarg installation.
For the moment I didn't change the howto, I'll change it this week-end.

Regards.

Offline ajkeane

  • ****
  • 187
  • +0/-0
    • http://keane.co.nz
[Announce] Sarg on sme server 7
« Reply #19 on: May 15, 2006, 08:07:53 AM »
Hi thanks for that.

I upgrade on the 13th and all seemed to go well untill the next morning when I checked the usage and find that there are no reports being generated overnight.

The scripts are all present in cron.daily weekly etc.

Is anyone else having these issues.

I uninstalled the previous version and then installed the new.

Thanks in advance for any insites into what i have done wrong.

Tony
...

shaneO

[Announce] Sarg on sme server 7
« Reply #20 on: May 16, 2006, 07:41:15 AM »
Hi Guys,

We installed this package today running off the latest RPM. I have found what ajkeane has found where no data is being shown.

after closer inspection something has changed, the /etc/cron.daily/sarg file has some differences, /usr/sbin/sarg is incorrect as the file lives in /usr/bin this was the first error which stopped it from creating the pages.

Once the files were created they went to /var/www/squid/daily, except the URL on the webpanel is expecting it to be /var/www/sarg/daily.

This is also the case for /etc/cron.weekly & monthly.

Another interesting thing to note is ONE-SHOT doesn't work unless you run the sarg command from the /usr/bin.

I have now got working SARG reports, but i am a newbie and i might have missed a fundamental piece of info so don't flame me if I have missed something simple.

Cheers

ShaneO

Offline MasterSleepy

  • *
  • 386
  • +0/-0
    • http://www.vanhees.cc
[Announce] Sarg on sme server 7
« Reply #21 on: May 17, 2006, 07:55:25 AM »
Hello,

Great thanks, ShaneO & ajkeane, for that feedback.
I'll adapt the rpm today or tomorrow.

Regards.

Offline MasterSleepy

  • *
  • 386
  • +0/-0
    • http://www.vanhees.cc
[UPDATED] Sarg Howto and contrib
« Reply #22 on: May 17, 2006, 09:17:15 PM »
Hello all,

The new version of rpm is available.
smeserver-sarg-1.4.1-2.i386.rpm
http://www.vanhees.cc/index.php?name=CmodsDownload&file=index&req=getit&lid=289

smeserver-sarg-1.4.1-2.src.rpm
http://www.vanhees.cc/index.php?name=CmodsDownload&file=index&req=getit&lid=290

Regards.

Offline timn

  • *
  • 62
  • +0/-0
    • Nash CDL
[Announce] Sarg on sme server 7
« Reply #23 on: May 22, 2006, 01:22:51 PM »
Hi
I installed this rpm on Friday but cannot get reports via Server Manager. The cron jobs are working and creating them in /var/www/sarg, but I get a message 'File not found /squid/daily/index.html' - and for weekly, monthly and onetime - when I try to access via Server Manager Sarg menu. There is an entry in httpd.conf setting an alias of /squid to /var/www/sarg.

Tim

Offline MasterSleepy

  • *
  • 386
  • +0/-0
    • http://www.vanhees.cc
[Announce] Sarg on sme server 7
« Reply #24 on: May 22, 2006, 09:37:37 PM »
Hello,

An another bug,  :hammer:
Thanks timn.

The new version of rpm is available.
smeserver-sarg-1.4.1-3.i386.rpm
http://www.vanhees.cc/index.php?name=CmodsDownload&file=index&req=getit&lid=289

smeserver-sarg-1.4.1-3.src.rpm
http://www.vanhees.cc/index.php?name=CmodsDownload&file=index&req=getit&lid=290

Regards.

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
[Announce] Sarg on sme server 7
« Reply #25 on: May 23, 2006, 04:23:36 AM »
Hi

Can we please get this put into the main contribs section (http://no.longer.valid/phpwiki/index.php/SME7Contribs) ... I think a lot of ppl would use this ... and it will get lost here.

Regards,

Tib

Offline swissis

  • **
  • 61
  • +0/-0
[Announce] Sarg on sme server 7
« Reply #26 on: June 12, 2006, 02:51:12 PM »
Something is wrong, i get the normal sarg page but when i try to view a report i get this page:
Code: [Select]

Not Found

The requested URL /squid/ONE-SHOT/index.html was not found on this server.
...

Offline MasterSleepy

  • *
  • 386
  • +0/-0
    • http://www.vanhees.cc
[Announce] Sarg on sme server 7
« Reply #27 on: June 12, 2006, 02:55:57 PM »
Hello,

The "ONE-SHOT" section is only for manual launch.
So that message is normal except if you have launch it manually.

Regards.

Offline swissis

  • **
  • 61
  • +0/-0
[Announce] Sarg on sme server 7
« Reply #28 on: June 12, 2006, 06:56:57 PM »
I have the same error for the other reports like daily, weekly
...

Offline MasterSleepy

  • *
  • 386
  • +0/-0
    • http://www.vanhees.cc
[Announce] Sarg on sme server 7
« Reply #29 on: June 13, 2006, 08:30:53 AM »
Hello,

For daily report, you have to wait one day, so normally you should see result next morning.
For weekly, you can see result next monday morning.
For monthly, result are generated first of each month.

regards.

Offline swissis

  • **
  • 61
  • +0/-0
[Announce] Sarg on sme server 7
« Reply #30 on: June 14, 2006, 07:22:00 PM »
Yeah, now it works. Can you tell me how to translate de usernames to some more readable? now it lists the pc name

1   date/time   pc-00183.promaen.local   350   101.988.095   71.93%   0.05%   99.95%   00:12:30   750.662   22.46%
2   date/time   pc-02689.promaen.local   2.318   13.555.810   9.56%   4.23%   95.77%   00:08:58   538.342   16.11%
3   date/time   pc-02610.promaen.local   1.990   13.025.772   9.19%   0.20%   99.80%   00:05:14   314.627   9.42%
...

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
[Announce] Sarg on sme server 7
« Reply #31 on: June 15, 2006, 05:40:13 AM »
It is a bit of a pain this way

The old Sarg on SME 6 shows the Ip address of the machine ... that is a slightly better way I would think as it is easier to find out what machine it is.

The PC name can be found here ... /var/lib/dhcp/dhcpd.leases

But I wouldn't know how to intergrate that into anything as I know nothing about scripting etc.

Maybe MasterSleepy can have a look and see if he can do anything with it.

Regards,

Tib

Offline MasterSleepy

  • *
  • 386
  • +0/-0
    • http://www.vanhees.cc
[Announce] Sarg on sme server 7
« Reply #32 on: June 15, 2006, 04:14:47 PM »
Hello,

I'll check for ip problem.

Regards.

Offline sabrewulf

  • 13
  • +0/-0
    • http://www.kustard.org
Sunday/Weekly/Monthly Reports
« Reply #33 on: September 24, 2006, 11:54:21 PM »
G'day all,

I've installed the latest SARG rpm on a fresh 7.0 SME server/gateway machine but am only getting Monday to Saturday reports. The machine has been running for 2 months now.

Any ideas where I can look for what may be stopping the Sunday/Weekly/Monthly reports from being generated.

Everything looks good to me (cron jobs look correct), so not really sure where the problem lies.
...

Offline MasterSleepy

  • *
  • 386
  • +0/-0
    • http://www.vanhees.cc
[Announce] Sarg on sme server 7
« Reply #34 on: September 25, 2006, 09:55:51 AM »
Hello,

You are right, saterday statistic are missing.
I will check for that as soon.

Regards.

Offline jonic

  • *
  • 103
  • +1/-0
[Announce] Sarg on sme server 7
« Reply #35 on: October 07, 2006, 02:48:01 PM »
I'm having some troubles too with the sarg contrib. I only get the montlhly reports. The others (one-shot, daily, weekly) give me an " /squid/daily/index.html was not found " type of error. I tried launching the cron jobs manually but to no avail.

This is on a fresh install of SME Server v7.0, running for a couple of days now.


Offline jonic

  • *
  • 103
  • +1/-0
[Announce] Sarg on sme server 7
« Reply #37 on: October 10, 2006, 02:18:01 PM »
Thanks MasterSleepy, I've installed the new rpms and everything seems to work ok.

However I had to disable squid for the moment, cause one of the users had some problems accessing a specific site. Can squid be setup so a machine bypasses the transparent proxy? Or does the setting must be done on that machine?

SMESA

[Announce] Sarg on sme server 7
« Reply #38 on: November 03, 2006, 08:35:46 AM »
First of all, thanks alot MasterSleepy for your tireless work on Sarg for SME.

I have installed your contrib, and it's been working great for about a month, now however Im getting "Segmentation fault" errors when the cron.daily/sarg runs.

I've googled and found this http://mikhail.greenway.ru/sarg/ have you come across this fault before?

Thank you
Alfred

Offline MasterSleepy

  • *
  • 386
  • +0/-0
    • http://www.vanhees.cc
[Announce] Sarg on sme server 7
« Reply #39 on: November 06, 2006, 08:24:08 AM »
Hello,

Try running lastest version.
You could find it at http://www.dungog.net/

Regards.

Offline byte

  • *
  • 2,183
  • +2/-0
[Announce] Sarg on sme server 7
« Reply #40 on: November 06, 2006, 11:11:19 AM »
Quote from: "MasterSleepy"
Hello,

Try running lastest version.
You could find it at http://www.dungog.net/

Regards.


MasterSleepy, I noticed Stephen had sarg as well, what are the differences between your version and Dungog?

Thanks!
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline MasterSleepy

  • *
  • 386
  • +0/-0
    • http://www.vanhees.cc
[Announce] Sarg on sme server 7
« Reply #41 on: November 06, 2006, 03:32:05 PM »
Hello,

Dungog version use two rpm, the first one is i386 sarg compiled.
The last one is bundle of script for smeserver 7.
Advantage of this solution is that it use binary build for rhel.

Regards.

Offline byte

  • *
  • 2,183
  • +2/-0
[Announce] Sarg on sme server 7
« Reply #42 on: November 06, 2006, 08:03:44 PM »
Quote from: "MasterSleepy"

Dungog version use two rpm, the first one is i386 sarg compiled.
The last one is bundle of script for smeserver 7.
Advantage of this solution is that it use binary build for rhel.


Ok - Thanks, so in future anyone looking to install sarg should use the dungog version as it is built with the rhel version on which the SME Server is based.
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline stephen noble

  • *
  • 607
  • +1/-0
    • Dungog
[Announce] Sarg on sme server 7
« Reply #43 on: November 07, 2006, 04:28:10 PM »
fyi
sarg-2.2.1-1.el4.rf.i386.rpm
is lifted from dag, so you could d/l directly from there
(MasterSleepy is welcome to keep control of releases
Michael may not want to split the rpm)

there are two smeserver-sarg rpms
for 1.x wich is bundled with the binary
and for 2.x which is seperated

2.x uses a different method in the cron*/sarg files
which is irrelevant to users

but both this and the old method will fail when bug 1990 is fixed
http://bugs.contribs.org/show_bug.cgi?id=1990
ie the log filename will not match the long format

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
[Announce] Sarg on sme server 7
« Reply #44 on: November 07, 2006, 05:29:35 PM »
This hasn't been easy  I tell you  :shock:
I started presenting these bugs long ago and no one seemed to think it was SME related.
Today I'm using the latest version of sargs and also Dansguardian, so since I pointed sargs to the Dansguardian directory, I no longer care about the files on /var/log/squid. I then made a script to clean this directory:
Code: [Select]
#/bin/bash

for i in /var/log/squid/*; do
   > "$i";
done
which I run every 48hrs (high traffic here at school)

This brought me another problem, since I use the Web interface provided by Dungog.net to manage Dans, it does not restart Dans or squid by itself:
Code: [Select]
svc -d /service/squid
svc -d /service/dansguardian
svc -u /service/squid
svc -u /service/dansguardian


I hope this helps someone in case they need a 'hack' to get things going...

Offline stephen noble

  • *
  • 607
  • +1/-0
    • Dungog
[Announce] Sarg on sme server 7
« Reply #45 on: November 07, 2006, 09:58:39 PM »
>svc -u /service/dansguardian

smeserver-dansguardian isn't a requirement for dansguardian but be aware that smeserver-dansguardian-2.9 doesn't use svc anymore

use dansguardian -q
dansguardian

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
[Announce] Sarg on sme server 7
« Reply #46 on: November 07, 2006, 10:45:44 PM »
Thanks for the tip Steven,
Maybe you should update your package then as these commands are still being posted when 'save/reload all' gets hit.

Offline kmccarn

  • ***
  • 112
  • +0/-0
[Announce] Sarg on sme server 7
« Reply #47 on: March 18, 2007, 02:49:50 PM »
Granted - I don't check the SARG reports very often....

Since Dec 8 2006 - all I get for users is localhost - before that I got listings by pc - so I could tell who went where from which pc.

There must have been an update around that timeframe which broke the sarg reporting.

any suggestions appreciated.

BTW - system is running 7.1.2 - now at least. With Dansguardian from Dungog.
Kevin in WV 8-)......