Koozali.org: home of the SME Server

SARG reporting options?

Offline cjensen

  • *
  • 133
  • +0/-0
    • http://acenet-tech.org
SARG reporting options?
« Reply #15 on: April 26, 2007, 06:56:09 PM »
The -e flag for sarg sends report to an email.  Appending a custom-template with this option may accomplish your need.

copy /etc/e-smith/tamplates/etc/sarg/sarg.conf to custom-templates

edit the lines:

#output_email none

to

output_email yourdesiredemail.com

Re-expand the template and run sarg.daily to test.

Here is what you get:
Code: [Select]

Squid User Access Report
Decreasing Access (bytes)
Period 2007Apr25-2007Apr25

NUM     USERID               CONNECT  BYTES           %BYTES  ELAPSED TIME MILISEC    %TIME  
------- -------------------- -------- --------------- ------- ---------- ---------- -------
      1              user1     2546          63.56M  68.70%   05:42:17   20537430  69.34%
      2                  user2     4403          27.61M  29.85%   02:20:02    8402288  28.37%
      3                user3      212           1.33M   1.45%   00:11:20     680130   2.30%
------- -------------------- -------- --------------- ------- ---------- ---------- -------
TOTAL                            7161          92.51M           08:13:39   29619848
AVERAGE                          2387          30.83M           02:44:33    9873282

Thu Apr 26 10:51:57 2007


this output may not be what you want, but it does email the result of a sarg execution.

Also from the sarg.conf file... "If you use this tag (-e), no html reports will be generated."

Craig

Offline haymann

  • *
  • 212
  • +0/-0
SARG reporting options?
« Reply #16 on: April 26, 2007, 09:32:04 PM »
Thanks Craig,

I think that I will stay with the html reports, a lot more information available that way.

I figured out what I did wrong for the custom template. I had copied the process from another contrib and did not adjust the path to reflect sarg. I created the template in
Code: [Select]
/etc/e-smith/templates-custom/etc/conf/httpd.conf but it should have been
Code: [Select]
/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/ :oops:
Works much better now. I currently have the require user line commented out in the custom template, but I would rather have it accept a valid SME user. I liked the idea of authuser, but that doesn't appear to work...
Ryan

Offline shell

  • ****
  • 117
  • +0/-0
SARG reporting options?
« Reply #17 on: April 27, 2007, 01:44:19 AM »
just a thought - instead of changing admin to authuser have you tried adding the username of the other account onto the end?

Code: [Select]

AuthName "SME Server Manager"
AuthType Basic
AuthExternal pwauth
require user admin, otherusername

Offline mmccarn

  • *
  • 2,651
  • +10/-0
SARG reporting options?
« Reply #18 on: April 27, 2007, 01:28:17 PM »
I've used
Code: [Select]
AuthType Basic
AutExternal pwauth
...
Require valid-user
to allow any configured SME user to access a specific URL...

If you want to allow multiple separate users, use space to delimit:
Code: [Select]
Require user admin otheruser
Require user authuser would only work for a user named "authuser"...

http://httpd.apache.org/docs/2.0/mod/core.html#require

Offline haymann

  • *
  • 212
  • +0/-0
SARG reporting options?
« Reply #19 on: April 27, 2007, 06:12:12 PM »
Thank you shell and mmccarn,

Adding additional users by adding a space and then another user account will work great. I could not get valid-user to work, I am guessing that it was looking for an account name valid-user??

The nice thing about commenting the line out completely is that it doesn't prompt you for a username and password again. I guess SARG can't tell who logged into server-manager anymore.

Thanks again to all!
Ryan

Offline haymann

  • *
  • 212
  • +0/-0
SARG reporting options?
« Reply #20 on: April 27, 2007, 06:16:55 PM »
Quote from: "haymann"
I could not get valid-user to work
:oops:  :oops: My bad, when I used
Code: [Select]
require valid-user it worked a lot better than
Code: [Select]
require user valid-user