LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 07-04-2007, 01:18 PM   #1
blood_omen
Member
 
Registered: Apr 2004
Location: Canada
Distribution: OpenBSD 3.6, Slackware 10.1
Posts: 134

Rep: Reputation: 15
Configuring SARG on OpenBSD


Greetings,

I'm facing the following challenge, I'm trying to make a proxy server with sarg to cache and monitor the internet traffic on my company.

I'm currently using:
OpenBSD 4.1
squid-2.6.STABLE9-transparent-snmp
sarg-2.1p0
Apache 1.3.x in chroot (default for OBSD)

All standard, precompiled packages provided on the OpenBSD repository.

I have apache working serving web pages, I also installed and configured squid and at this very moment it is working and caching all web traffic, now I need to see what is it that is caching.

Does anybody knows of a good howto configure sarg on OBSD so to point me on the right directions?


Any help will be appreciated, thanks in advance.

P.S: If not sarg, it could be any other monitoring tool.
 
Old 07-04-2007, 03:18 PM   #2
blood_omen
Member
 
Registered: Apr 2004
Location: Canada
Distribution: OpenBSD 3.6, Slackware 10.1
Posts: 134

Original Poster
Rep: Reputation: 15
Ok, I got sarg installed and configured; however, I'm facing the following error whenever I try to start sarg, it gives me this error:
Code:
# sarg
SARG: File not found: /var/squid/logs/access.log
Here's the part of my sarg.conf file stating the path to the access.log file
Code:
# TAG:  access_log file
#       Where is the access.log file
#       sarg -l file
#
access_log /var/squid/logs/access.log
Here's the output of the /var/squid/logs directory
Code:
# ls -l /var/squid/logs/                                                                                               
total 2956
-rw-r-----  1 _squid  _squid  617425 Jul  3 16:17 access.log
-rw-r-----  1 _squid  _squid   20025 Jul  3 18:56 cache.log
-rw-r--r--  1 root    _squid       6 Jul  3 18:55 squid.pid
-rw-r-----  1 _squid  _squid  825785 Jul  3 18:56 store.log
Once again, any help is apreciated.
 
Old 07-06-2007, 10:58 AM   #3
blood_omen
Member
 
Registered: Apr 2004
Location: Canada
Distribution: OpenBSD 3.6, Slackware 10.1
Posts: 134

Original Poster
Rep: Reputation: 15
Hello,

Any help will be appreciated, thanks.
 
Old 07-10-2007, 06:46 PM   #4
SteveK1979
Member
 
Registered: Feb 2004
Location: UK
Distribution: RHEL, Ubuntu, Solaris 11, NetBSD, OpenBSD
Posts: 225

Rep: Reputation: 43
Hi,

Firstly, I've never used SARG, but it sounds like something that might be worth me checking out for my system

Anyway, given that it appears to know where to find the squid access.log, are you sure that it has permissions to read the file? A quick glance indicates that the user sarg runs as would probably need to be in the _squid group.

Cheers,
Steve
 
Old 07-18-2007, 01:53 PM   #5
blood_omen
Member
 
Registered: Apr 2004
Location: Canada
Distribution: OpenBSD 3.6, Slackware 10.1
Posts: 134

Original Poster
Rep: Reputation: 15
Solved

I still don't know who it happens, any input to clarify why it worked will be appreciated.

Used the sarg command parsing along the way the file to get the input from to somehow force the file load, and to my surprise it worked.
Code:
sarg -f /var/squid/logs/access/log
After that just needed to solved minor details in apache, then I went and commented the line from this
Code:
# TAG:  access_log file
#       Where is the access.log file
#       sarg -l file
#
access_log /var/squid/logs/access.log
to
Code:
# TAG:  access_log file
#       Where is the access.log file
#       sarg -l file
#
#access_log /var/squid/logs/access.log
now I just input
Code:
sarg
and everything is working just fine. Again, due to the fact that I'm new to the proxy thing I must have been missing something before, so anyone who might know about this behaviour and cares to explain me why it behave the way it did is appreciated
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help in SARG depam Linux - Software 1 10-14-2005 09:06 PM
Configuring the Ports tree in OpenBSD blood_omen *BSD 2 10-19-2004 12:06 AM
sarg thiyagu4u Linux - Networking 0 09-13-2004 11:13 AM
Configuring XFree86 on OpenBSD 3.4 masinick *BSD 6 03-25-2004 05:25 PM
configuring openbsd 3.3 pppoe gateway yocompia *BSD 3 09-28-2003 01:11 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 05:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration